[ox/std] Add version of OutStream that takes String
This commit is contained in:
parent
0aad2913ea
commit
39b1292b91
10
deps/ox/src/ox/std/trace.hpp
vendored
10
deps/ox/src/ox/std/trace.hpp
vendored
@ -57,6 +57,13 @@ class OutStream {
|
||||
TraceMsg m_msg;
|
||||
|
||||
public:
|
||||
constexpr OutStream(const char *file, int line, const char *ch, const String &msg) noexcept {
|
||||
m_msg.file = file;
|
||||
m_msg.line = line;
|
||||
m_msg.ch = ch;
|
||||
m_msg.msg = msg.c_str();
|
||||
}
|
||||
|
||||
constexpr OutStream(const char *file, int line, const char *ch, const char *msg = "") noexcept {
|
||||
m_msg.file = file;
|
||||
m_msg.line = line;
|
||||
@ -217,6 +224,9 @@ constexpr OutStream &OutStream::operator<<(unsigned long long v) noexcept {
|
||||
class NullStream {
|
||||
|
||||
public:
|
||||
constexpr NullStream(const char*, int, const char*, const String&) noexcept {
|
||||
}
|
||||
|
||||
constexpr NullStream(const char*, int, const char*, const char* = "") noexcept {
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user