diff options
author | Kitzunu <24550914+Kitzunu@users.noreply.github.com> | 2024-09-03 12:59:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-03 07:59:37 -0300 |
commit | de2bcbdabf19cb05682b2087b42726ee2325fe8e (patch) | |
tree | 79b0cbc222519b7c283938daecbbce0c4b2a29a6 /src/common/Debugging/Errors.cpp | |
parent | f6fd978a7a871ff91ad67e60284c5195e227dcd5 (diff) |
refactor(Core/Misc): Acore::StringFormat to fmt format (#19838)
refactor(Core/Utilities): Acore::StringFormat to fmt format
* closes https://github.com/azerothcore/azerothcore-wotlk/issues/10356
Diffstat (limited to 'src/common/Debugging/Errors.cpp')
-rw-r--r-- | src/common/Debugging/Errors.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/common/Debugging/Errors.cpp b/src/common/Debugging/Errors.cpp index 9ca5f8c294..b42b34a187 100644 --- a/src/common/Debugging/Errors.cpp +++ b/src/common/Debugging/Errors.cpp @@ -62,19 +62,19 @@ namespace inline std::string MakeMessage(std::string_view messageType, std::string_view file, uint32 line, std::string_view function, std::string_view message, std::string_view fmtMessage = {}, std::string_view debugInfo = {}) { - std::string msg = Acore::StringFormatFmt("\n>> {}\n\n# Location: {}:{}\n# Function: {}\n# Condition: {}\n", messageType, file, line, function, message); + std::string msg = Acore::StringFormat("\n>> {}\n\n# Location: {}:{}\n# Function: {}\n# Condition: {}\n", messageType, file, line, function, message); if (!fmtMessage.empty()) { - msg.append(Acore::StringFormatFmt("# Message: {}\n", fmtMessage)); + msg.append(Acore::StringFormat("# Message: {}\n", fmtMessage)); } if (!debugInfo.empty()) { - msg.append(Acore::StringFormatFmt("\n# Debug info: {}\n", debugInfo)); + msg.append(Acore::StringFormat("\n# Debug info: {}\n", debugInfo)); } - return Acore::StringFormatFmt( + return Acore::StringFormat( "#{0:-^{2}}#\n" " {1: ^{2}} \n" "#{0:-^{2}}#\n", "", msg, 70); @@ -90,14 +90,14 @@ namespace */ inline std::string MakeAbortMessage(std::string_view file, uint32 line, std::string_view function, std::string_view fmtMessage = {}) { - std::string msg = Acore::StringFormatFmt("\n>> ABORTED\n\n# Location '{}:{}'\n# Function '{}'\n", file, line, function); + std::string msg = Acore::StringFormat("\n>> ABORTED\n\n# Location '{}:{}'\n# Function '{}'\n", file, line, function); if (!fmtMessage.empty()) { - msg.append(Acore::StringFormatFmt("# Message '{}'\n", fmtMessage)); + msg.append(Acore::StringFormat("# Message '{}'\n", fmtMessage)); } - return Acore::StringFormatFmt( + return Acore::StringFormat( "\n#{0:-^{2}}#\n" " {1: ^{2}} \n" "#{0:-^{2}}#\n", "", msg, 70); @@ -148,7 +148,7 @@ void Acore::Abort(std::string_view file, uint32 line, std::string_view function, void Acore::AbortHandler(int sigval) { // nothing useful to log here, no way to pass args - std::string formattedMessage = StringFormatFmt("Caught signal {}\n", sigval); + std::string formattedMessage = StringFormat("Caught signal {}\n", sigval); fmt::print(stderr, "{}", formattedMessage); fflush(stderr); Crash(formattedMessage.c_str()); |