mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 12:10:09 +02:00
Prevent allocations caused by Logger::log_trace
C++ would always construct an `std::string` from the string constant every iteration. Since this also happened when `YABRIDGE_DEBUG_LEVEL` is not set to 2, this ended up causing unnecessary allocations.
This commit is contained in:
@@ -125,9 +125,3 @@ void Logger::log(const std::string& message) {
|
||||
|
||||
*stream << formatted_message.str() << std::flush;
|
||||
}
|
||||
|
||||
void Logger::log_trace(const std::string& message) {
|
||||
if (verbosity >= Verbosity::all_events) {
|
||||
log(message);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user