diff --git a/deps/ox/src/ox/std/trace.cpp b/deps/ox/src/ox/std/trace.cpp index 12d785db..96b70636 100644 --- a/deps/ox/src/ox/std/trace.cpp +++ b/deps/ox/src/ox/std/trace.cpp @@ -10,16 +10,6 @@ namespace ox::trace { -void logError(const char *file, int line, const Error &err) { - if (err) { - TraceStream trc(file, line, "ox::error"); - trc << "Error:" << err; - if (err.file != nullptr) { - trc << "(" << err.file << ":" << err.line << ")"; - } - } -} - void init() { oxTraceInitHook(); } diff --git a/deps/ox/src/ox/std/trace.hpp b/deps/ox/src/ox/std/trace.hpp index 1e17eec7..5113ad87 100644 --- a/deps/ox/src/ox/std/trace.hpp +++ b/deps/ox/src/ox/std/trace.hpp @@ -257,7 +257,15 @@ using TraceStream = OutStream; using TraceStream = NullStream; #endif -void logError(const char *file, int line, const Error &err); +inline void logError(const char *file, int line, const Error &err) noexcept { + if (err) { + TraceStream trc(file, line, "ox::error"); + trc << "Error:" << err; + if (err.file != nullptr) { + trc << "(" << err.file << ":" << err.line << ")"; + } + } +} void init();