This is an automated email from the ASF dual-hosted git repository. swebb2066 pushed a commit to branch prevent_clang_warnings in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit 932663da33589b4c35ae3fa72e735869dbf6d243 Author: Stephen Webb <[email protected]> AuthorDate: Sat Nov 12 17:42:37 2022 +1100 Prevent Clang warning messages --- src/main/include/log4cxx/helpers/object.h | 8 ++++---- src/main/include/log4cxx/hierarchy.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/include/log4cxx/helpers/object.h b/src/main/include/log4cxx/helpers/object.h index b8382a5c..63532c3e 100644 --- a/src/main/include/log4cxx/helpers/object.h +++ b/src/main/include/log4cxx/helpers/object.h @@ -49,13 +49,13 @@ return new object();\ }\ };\ - virtual const helpers::Class& getClass() const;\ + const helpers::Class& getClass() const override;\ static const helpers::Class& getStaticClass(); \ static const log4cxx::helpers::ClassRegistration& registerClass(); #define DECLARE_LOG4CXX_OBJECT_WITH_CUSTOM_CLASS(object, class)\ public:\ - virtual const helpers::Class& getClass() const;\ + const helpers::Class& getClass() const override;\ static const helpers::Class& getStaticClass();\ static const log4cxx::helpers::ClassRegistration& registerClass(); @@ -139,7 +139,7 @@ std::shared_ptr<Ret> cast(const std::shared_ptr<Type>& incoming) } #define BEGIN_LOG4CXX_CAST_MAP()\ - const void * cast(const helpers::Class& clazz) const\ + const void * cast(const helpers::Class& clazz) const override\ {\ const void * object = 0;\ if (&clazz == &helpers::Object::getStaticClass()) return (const helpers::Object *)this; @@ -147,7 +147,7 @@ std::shared_ptr<Ret> cast(const std::shared_ptr<Type>& incoming) #define END_LOG4CXX_CAST_MAP()\ return object;\ }\ - bool instanceof(const helpers::Class& clazz) const\ + bool instanceof(const helpers::Class& clazz) const override\ { return cast(clazz) != 0; } #define LOG4CXX_CAST_ENTRY(Interface)\ diff --git a/src/main/include/log4cxx/hierarchy.h b/src/main/include/log4cxx/hierarchy.h index e4d06fde..bb3a692d 100644 --- a/src/main/include/log4cxx/hierarchy.h +++ b/src/main/include/log4cxx/hierarchy.h @@ -100,7 +100,7 @@ class LOG4CXX_EXPORT Hierarchy : public spi::LoggerRepository @param name The name of the logger to search for. */ - LoggerPtr exists(const LogString& name); + LoggerPtr exists(const LogString& name) override; /** The string form of {@link #setThreshold(const LevelPtr&) setThreshold}. @@ -160,7 +160,7 @@ class LOG4CXX_EXPORT Hierarchy : public spi::LoggerRepository <p>The root logger is <em>not</em> included in the returned LoggerList. */ - LoggerList getCurrentLoggers() const; + LoggerList getCurrentLoggers() const override; /** Get the root of this hierarchy.
