Prevent allocations in Vst3Logger::log_query_interface

String constants will be converted to `std::string` because it's not
constexpr yet, and that will allocate for longer strings. Since this
function only prints something when `YABRIDGE_DEBUG_LEVEL` is set to 2
or higher that seems like a waste.
This commit is contained in:
Robbert van der Helm
2021-05-31 18:07:19 +02:00
parent 2bf1c4c5eb
commit 5f4ffed90b
3 changed files with 12 additions and 4 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ std::string format_bstream(const YaBStream& stream) {
Vst3Logger::Vst3Logger(Logger& generic_logger) : logger(generic_logger) {}
void Vst3Logger::log_query_interface(
const std::string& where,
const char* where,
tresult result,
const std::optional<Steinberg::FUID>& uid) {
if (logger.verbosity >= Logger::Verbosity::all_events) [[unlikely]] {