[ox/std] Make logError inline
This commit is contained in:
parent
cc5cc01e70
commit
5d5198bf4c
10
deps/ox/src/ox/std/trace.cpp
vendored
10
deps/ox/src/ox/std/trace.cpp
vendored
@ -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();
|
||||
}
|
||||
|
10
deps/ox/src/ox/std/trace.hpp
vendored
10
deps/ox/src/ox/std/trace.hpp
vendored
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user