Added final keywords
This commit is contained in:
parent
86ccb3fc1e
commit
b789fb52dd
@ -120,7 +120,7 @@ enum class pattern_time_type {
|
|||||||
//
|
//
|
||||||
// Log exception
|
// Log exception
|
||||||
//
|
//
|
||||||
class SPDLOG_API spdlog_ex : public std::exception {
|
class SPDLOG_API spdlog_ex final : public std::exception {
|
||||||
public:
|
public:
|
||||||
explicit spdlog_ex(std::string msg);
|
explicit spdlog_ex(std::string msg);
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
namespace spdlog {
|
namespace spdlog {
|
||||||
namespace sinks {
|
namespace sinks {
|
||||||
template <typename Mutex>
|
template <typename Mutex>
|
||||||
class dup_filter_sink : public dist_sink<Mutex> {
|
class dup_filter_sink final : public dist_sink<Mutex> {
|
||||||
public:
|
public:
|
||||||
template <class Rep, class Period>
|
template <class Rep, class Period>
|
||||||
explicit dup_filter_sink(std::chrono::duration<Rep, Period> max_skip_duration, level notification_level = level::info)
|
explicit dup_filter_sink(std::chrono::duration<Rep, Period> max_skip_duration, level notification_level = level::info)
|
||||||
|
@ -17,7 +17,7 @@ namespace sinks {
|
|||||||
* Sink that write to syslog using the `syscall()` library call.
|
* Sink that write to syslog using the `syscall()` library call.
|
||||||
*/
|
*/
|
||||||
template <typename Mutex>
|
template <typename Mutex>
|
||||||
class syslog_sink : public base_sink<Mutex> {
|
class syslog_sink final : public base_sink<Mutex> {
|
||||||
public:
|
public:
|
||||||
syslog_sink(std::string ident, int syslog_option, int syslog_facility, bool enable_formatting)
|
syslog_sink(std::string ident, int syslog_option, int syslog_facility, bool enable_formatting)
|
||||||
: enable_formatting_{enable_formatting},
|
: enable_formatting_{enable_formatting},
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#define SIMPLE_LOG "test_logs/simple_log.txt"
|
#define SIMPLE_LOG "test_logs/simple_log.txt"
|
||||||
#define SIMPLE_ASYNC_LOG "test_logs/simple_async_log.txt"
|
#define SIMPLE_ASYNC_LOG "test_logs/simple_async_log.txt"
|
||||||
|
|
||||||
class failing_sink : public spdlog::sinks::base_sink<std::mutex> {
|
class failing_sink final : public spdlog::sinks::base_sink<std::mutex> {
|
||||||
protected:
|
protected:
|
||||||
void sink_it_(const spdlog::details::log_msg &) final { throw std::runtime_error("some error happened during log"); }
|
void sink_it_(const spdlog::details::log_msg &) final { throw std::runtime_error("some error happened during log"); }
|
||||||
|
|
||||||
|
@ -292,7 +292,7 @@ TEST_CASE("clone-formatter-2", "[pattern_formatter]") {
|
|||||||
REQUIRE(to_string_view(formatted_1) == to_string_view(formatted_2));
|
REQUIRE(to_string_view(formatted_1) == to_string_view(formatted_2));
|
||||||
}
|
}
|
||||||
|
|
||||||
class custom_test_flag : public spdlog::custom_flag_formatter {
|
class custom_test_flag final : public spdlog::custom_flag_formatter {
|
||||||
public:
|
public:
|
||||||
explicit custom_test_flag(std::string txt)
|
explicit custom_test_flag(std::string txt)
|
||||||
: some_txt{std::move(txt)} {}
|
: some_txt{std::move(txt)} {}
|
||||||
|
Loading…
Reference in New Issue
Block a user