Skip to content

Commit

Permalink
swaglog.cc/cloudlog_common: pass json object by reference (commaai#24996
Browse files Browse the repository at this point in the history
)

* pass json object by reference

* space between functions
  • Loading branch information
deanlee authored and spektor56 committed Jul 1, 2022
1 parent 1da3cb5 commit 1defe91
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion common/swaglog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ static void log(int levelnum, const char* filename, int lineno, const char* func
char levelnum_c = levelnum;
zmq_send(s.sock, (levelnum_c + log_s).c_str(), log_s.length() + 1, ZMQ_NOBLOCK);
}

static void cloudlog_common(int levelnum, const char* filename, int lineno, const char* func,
char* msg_buf, json11::Json::object msg_j={}) {
char* msg_buf, const json11::Json::object &msg_j={}) {
std::lock_guard lk(s.lock);
if (!s.initialized) s.initialize();

Expand Down

0 comments on commit 1defe91

Please sign in to comment.