From 978f3a3282f790f409c682368a4d54072d7d8968 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 4 Sep 2018 10:43:29 -0400 Subject: common/logging/filter: Make constructor explicit Implicit conversions aren't desirable here. --- src/common/logging/filter.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common/logging/filter.h') diff --git a/src/common/logging/filter.h b/src/common/logging/filter.h index d5ffc5a58..f13197fc9 100644 --- a/src/common/logging/filter.h +++ b/src/common/logging/filter.h @@ -19,7 +19,7 @@ namespace Log { class Filter { public: /// Initializes the filter with all classes having `default_level` as the minimum level. - Filter(Level default_level = Level::Info); + explicit Filter(Level default_level = Level::Info); /// Resets the filter so that all classes have `level` as the minimum displayed level. void ResetAll(Level level); -- cgit v1.2.3 From 2949d9552cc3cee6eed810e8205d32446a08e594 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 4 Sep 2018 10:44:36 -0400 Subject: common/logging/filter: Replace C-style case with C++ static_cast --- src/common/logging/filter.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common/logging/filter.h') diff --git a/src/common/logging/filter.h b/src/common/logging/filter.h index f13197fc9..f7e3b87c9 100644 --- a/src/common/logging/filter.h +++ b/src/common/logging/filter.h @@ -49,6 +49,6 @@ public: bool IsDebug() const; private: - std::array class_levels; + std::array(Class::Count)> class_levels; }; } // namespace Log -- cgit v1.2.3