From d7db2cf3aa5660dd892491c6106c5e6270b44ff1 Mon Sep 17 00:00:00 2001 From: gabime Date: Fri, 28 Jul 2023 17:40:21 +0300 Subject: [PATCH] Added some [[nodiscard]] annotations --- include/spdlog/logger.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/spdlog/logger.h b/include/spdlog/logger.h index 02a603d0..7a74bac8 100644 --- a/include/spdlog/logger.h +++ b/include/spdlog/logger.h @@ -204,10 +204,10 @@ public: void set_level(level::level_enum log_level); // return the active log level - level::level_enum level() const; + [[nodiscard]] level::level_enum level() const; // return the name of the logger - const std::string &name() const; + [[nodiscard]] const std::string &name() const; // set formatting for the sinks in this logger. // each sink will get a separate instance of the formatter object. @@ -222,10 +222,10 @@ public: // flush functions void flush(); void flush_on(level::level_enum log_level); - level::level_enum flush_level() const; + [[nodiscard]] level::level_enum flush_level() const; // sinks - const std::vector &sinks() const; + [[nodiscard]] const std::vector &sinks() const; std::vector &sinks();