You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by sw...@apache.org on 2023/10/19 02:00:46 UTC

[logging-log4cxx] branch master updated: Prevent SonarCloud warning

This is an automated email from the ASF dual-hosted git repository.

swebb2066 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git


The following commit(s) were added to refs/heads/master by this push:
     new 1681351d Prevent SonarCloud warning
1681351d is described below

commit 1681351d974c260eb1d07c3c31cd4bb9c24b1700
Author: Stephen Webb <sw...@gmail.com>
AuthorDate: Thu Oct 19 13:00:33 2023 +1100

    Prevent SonarCloud warning
---
 src/main/include/log4cxx/helpers/widelife.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/main/include/log4cxx/helpers/widelife.h b/src/main/include/log4cxx/helpers/widelife.h
index 94d5ab97..aee30157 100644
--- a/src/main/include/log4cxx/helpers/widelife.h
+++ b/src/main/include/log4cxx/helpers/widelife.h
@@ -70,6 +70,12 @@ public:
 
 private:
 	alignas(T) char storage[sizeof(T)];
+	// Non-copyable
+	WideLife(const WideLife& other) = delete;
+	WideLife(const WideLife&& other) = delete;
+	// Non-assignable
+	WideLife& operator=(const WideLife& other) = delete;
+	WideLife& operator=(const WideLife&& other) = delete;
 }; // class WideLife
 }  // namespace helpers
 } // namespace log4cx