Skip to content

Commit a8e6dc4

Browse files
deanleespektor56
authored andcommitted
swaglog.cc/cloudlog_common: pass json object by reference (commaai#24996)
* pass json object by reference * space between functions
1 parent 4ba7c52 commit a8e6dc4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

common/swaglog.cc

+2-1
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,9 @@ static void log(int levelnum, const char* filename, int lineno, const char* func
7272
char levelnum_c = levelnum;
7373
zmq_send(s.sock, (levelnum_c + log_s).c_str(), log_s.length() + 1, ZMQ_NOBLOCK);
7474
}
75+
7576
static void cloudlog_common(int levelnum, const char* filename, int lineno, const char* func,
76-
char* msg_buf, json11::Json::object msg_j={}) {
77+
char* msg_buf, const json11::Json::object &msg_j={}) {
7778
std::lock_guard lk(s.lock);
7879
if (!s.initialized) s.initialize();
7980

0 commit comments

Comments
 (0)