summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2017-11-02 08:26:49 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2017-11-02 08:26:49 +0000
commit6ca5c8495aaa5d24d4651e6e13fe4a883dcd11a7 (patch)
treea6347b8aa15eca87ef68aed364d383480df52e85
parentafbacda2a520a55dc7f0fce2bd33bf462d5dc6bc (diff)
parenta3bf0509e01c6b32a13cfd16060e4a537706f231 (diff)
Merge "Fixes LogEvent constructor to use reference."
-rw-r--r--cmds/statsd/src/logd/LogEvent.cpp2
-rw-r--r--cmds/statsd/src/logd/LogEvent.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/cmds/statsd/src/logd/LogEvent.cpp b/cmds/statsd/src/logd/LogEvent.cpp
index 451d26df28e0..26a82cbf84bc 100644
--- a/cmds/statsd/src/logd/LogEvent.cpp
+++ b/cmds/statsd/src/logd/LogEvent.cpp
@@ -30,7 +30,7 @@ using android::util::ProtoOutputStream;
// We need to keep a copy of the android_log_event_list owned by this instance so that the char*
// for strings is not cleared before we can read them.
-LogEvent::LogEvent(log_msg msg) : mList(msg) {
+LogEvent::LogEvent(log_msg& msg) : mList(msg) {
init(msg.entry_v1.sec * NS_PER_SEC + msg.entry_v1.nsec, &mList);
}
diff --git a/cmds/statsd/src/logd/LogEvent.h b/cmds/statsd/src/logd/LogEvent.h
index 9ef20ea6968c..df75d9f2e0b1 100644
--- a/cmds/statsd/src/logd/LogEvent.h
+++ b/cmds/statsd/src/logd/LogEvent.h
@@ -42,7 +42,7 @@ public:
/**
* Read a LogEvent from a log_msg.
*/
- explicit LogEvent(log_msg msg);
+ explicit LogEvent(log_msg& msg);
/**
* Constructs a LogEvent with the specified tag and creates an android_log_event_list in write