From 8c187e3ca5cd8e6ce8d486605e1283f2a7acc8b7 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Wed, 11 Mar 2020 15:54:40 +0100 Subject: [PATCH] Use const references for logging paylaod data --- src/common/logging.cpp | 2 +- src/common/logging.h | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/common/logging.cpp b/src/common/logging.cpp index 34cc3523..1bd95081 100644 --- a/src/common/logging.cpp +++ b/src/common/logging.cpp @@ -135,7 +135,7 @@ void Logger::log_event(bool is_dispatch, int opcode, int index, intptr_t value, - EventPayload payload, + const EventPayload& payload, float option) { if (BOOST_UNLIKELY(verbosity >= Verbosity::events)) { std::ostringstream message; diff --git a/src/common/logging.h b/src/common/logging.h index 22903654..79aef611 100644 --- a/src/common/logging.h +++ b/src/common/logging.h @@ -90,12 +90,11 @@ class Logger { void log_set_parameter_response(); // If is_dispatch is true, then use opcode names from the plugin's dispatch // function. Otherwise use names for the host callback function opcodes. - // TODO: Cosnt references for both payloads void log_event(bool is_dispatch, int opcode, int index, intptr_t value, - EventPayload payload, + const EventPayload& payload, float option); void log_event_response(bool is_dispatch, intptr_t return_value,