mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-24 17:41:34 +08:00
f999d879d5
The clang-tidy warning `clang-analyzer-cplusplus.Move` warns when a moved from object is deferenced. This is triggered in spdlog because clang-tidy fails to detect that the `logger:set_formatter` will only move the unique_ptr on the last iteration of the loop, assuming that `f->clone` may be called on it afterwards. To fix, add a break statement after moving the pointer (on the last iteration) to let clang-tidy know the logger pointer is not used after this point. |
||
---|---|---|
.. | ||
details | ||
fmt | ||
sinks | ||
async_logger-inl.h | ||
async_logger.h | ||
async.h | ||
common-inl.h | ||
common.h | ||
formatter.h | ||
logger-inl.h | ||
logger.h | ||
spdlog-inl.h | ||
spdlog.h | ||
tweakme.h | ||
version.h |