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
1f3dea60d3
commit
b640c59087
@ -22,10 +22,9 @@ protected:
|
|||||||
// 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(msg.level == level::off)
|
if(msg.level == level::off)
|
||||||
{
|
{
|
||||||
printf("Should never not be called if level is off!\n");
|
printf("null_sink: should never not be called if level is off!\n");
|
||||||
|
abort();
|
||||||
}
|
}
|
||||||
assert(msg.level != level::off);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
void flush_() override {}
|
void flush_() override {}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user