Codechange: make SetDebugString use C++-style strings and function types

This commit is contained in:
Rubidium
2025-04-24 23:50:59 +02:00
committed by rubidium42
parent 498a0f1c1b
commit 86039a5b69
5 changed files with 37 additions and 41 deletions

View File

@@ -56,7 +56,8 @@ extern int _debug_random_level;
#endif
void DumpDebugFacilityNames(std::back_insert_iterator<std::string> &output_iterator);
void SetDebugString(const char *s, void (*error_func)(const std::string &));
using SetDebugStringErrorFunc = void(std::string_view);
void SetDebugString(std::string_view s, SetDebugStringErrorFunc error_func);
std::string GetDebugString();
/** TicToc profiling.
@@ -92,7 +93,7 @@ struct TicToc {
}
};
void ShowInfoI(const std::string &str);
void ShowInfoI(std::string_view str);
#define ShowInfo(format_string, ...) ShowInfoI(fmt::format(FMT_STRING(format_string) __VA_OPT__(,) __VA_ARGS__))
std::string GetLogPrefix(bool force = false);