impr: Optimize frame times

This commit is contained in:
WerWolv
2024-06-25 13:54:46 +02:00
parent ba7c10f4b1
commit 4bc724791d
5 changed files with 10 additions and 8 deletions

View File

@@ -145,7 +145,7 @@ namespace hex::log {
}
void assertionHandler(bool expr, const char* exprString, const char* file, int line) {
if (!expr) {
if (!expr) [[unlikely]] {
log::error("Assertion failed: {} at {}:{}", exprString, file, line);
#if defined (DEBUG)

View File

@@ -71,7 +71,7 @@ namespace hex {
}
std::string View::toWindowName(const UnlocalizedString &unlocalizedName) {
return Lang(unlocalizedName) + "###" + unlocalizedName.get();
return fmt::format("{}###{}", Lang(unlocalizedName), unlocalizedName.get());
}
}