mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-26 10:31:34 +08:00
try to prevent optimizer to remove null sink code altogether
This commit is contained in:
parent
dca1d1e0d1
commit
a82d0e2f57
@ -17,7 +17,7 @@ template<typename Mutex>
|
|||||||
class null_sink : public base_sink<Mutex>
|
class null_sink : public base_sink<Mutex>
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
void sink_it_(const details::log_msg &msg) override
|
void sink_it_(const details::log_msg &) override
|
||||||
{
|
{
|
||||||
// prevent optimizer to remove this sink altogether (and do useful check while at it).
|
// prevent optimizer to remove this sink altogether (and do useful check while at it).
|
||||||
if(this->level() == level::off)
|
if(this->level() == level::off)
|
||||||
|
Loading…
Reference in New Issue
Block a user