Log: fix some parts of messages not being discarded early

`m_IsNoOp` was introduced to avoid building up log messages that will later be
discarded, like debug messages if no debug logging is configured. However, it
looks like the template operator<< implemented in the header file was forgotten
when adding this feature, all other places writing into `m_Buffer` already have
an if guard like added by this commit.
This commit is contained in:
Julian Brost 2024-09-27 14:23:05 +02:00
parent b6b1506bda
commit f0e084d530
1 changed files with 4 additions and 1 deletions

View File

@ -121,7 +121,10 @@ public:
template<typename T>
Log& operator<<(const T& val)
{
m_Buffer << val;
if (!m_IsNoOp) {
m_Buffer << val;
}
return *this;
}