[ox/std] Add version of OutStream that takes String

This commit is contained in:
Gary Talent 2021-07-23 21:28:58 -05:00
parent 0aad2913ea
commit 39b1292b91

View File

@ -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 {
}