From 67b633880b764ac0ad108db778c7b829a3ae6fab Mon Sep 17 00:00:00 2001 From: Jens Breitbart Date: Sat, 20 Dec 2014 15:06:36 +0100 Subject: [PATCH] Replaced throw() with noexcept and removed some unneeded ';'. --- include/spdlog/common.h | 4 ++-- include/spdlog/details/file_helper.h | 2 +- include/spdlog/sinks/base_sink.h | 2 +- include/spdlog/sinks/syslog_sink.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/spdlog/common.h b/include/spdlog/common.h index 8208b832..daf51ceb 100644 --- a/include/spdlog/common.h +++ b/include/spdlog/common.h @@ -71,8 +71,8 @@ inline const char* to_str(spdlog::level::level_enum l) class spdlog_ex : public std::exception { public: - spdlog_ex(const std::string& msg) :_msg(msg) {}; - const char* what() const throw() override + spdlog_ex(const std::string& msg) :_msg(msg) {} + const char* what() const noexcept override { return _msg.c_str(); } diff --git a/include/spdlog/details/file_helper.h b/include/spdlog/details/file_helper.h index 9a045bd6..fbc48e70 100644 --- a/include/spdlog/details/file_helper.h +++ b/include/spdlog/details/file_helper.h @@ -51,7 +51,7 @@ public: explicit file_helper(bool auto_flush): _fd(nullptr), _auto_flush(auto_flush) - {}; + {} file_helper(const file_helper&) = delete; file_helper& operator=(const file_helper&) = delete; diff --git a/include/spdlog/sinks/base_sink.h b/include/spdlog/sinks/base_sink.h index a1384819..f1647ae0 100644 --- a/include/spdlog/sinks/base_sink.h +++ b/include/spdlog/sinks/base_sink.h @@ -56,7 +56,7 @@ public: { std::lock_guard lock(_mutex); _sink_it(msg); - }; + } protected: diff --git a/include/spdlog/sinks/syslog_sink.h b/include/spdlog/sinks/syslog_sink.h index b6bb5eca..0b8b36ba 100644 --- a/include/spdlog/sinks/syslog_sink.h +++ b/include/spdlog/sinks/syslog_sink.h @@ -75,7 +75,7 @@ public: void log(const details::log_msg &msg) override { ::syslog(syslog_prio_from_level(msg), "%s", msg.formatted.str().c_str()); - }; + }