diff --git a/src/util.h b/src/util.h index 5ead5633a2..dfcdd37e29 100644 --- a/src/util.h +++ b/src/util.h @@ -434,9 +434,9 @@ void RenameThreadPool(ctpl::thread_pool& tp, const char* baseName); /** * .. and a wrapper that just calls func once */ -template void TraceThread(const char* name, Callable func) +template void TraceThread(const std::string name, Callable func) { - std::string s = strprintf("dash-%s", name); + std::string s = "dash-" + name; RenameThread(s.c_str()); try { @@ -450,7 +450,7 @@ template void TraceThread(const char* name, Callable func) throw; } catch (...) { - PrintExceptionContinue(std::current_exception(), name); + PrintExceptionContinue(std::current_exception(), name.c_str()); throw; } }