summaryrefslogtreecommitdiff
path: root/include/libcamera/internal/log.h
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2020-10-22 14:12:26 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2021-02-12 14:35:20 +0000
commit640f48d60399fe63f549f6cb5fa8623a6b6b2810 (patch)
tree3802132387aa0f9310e7d0efd5cde23a72e263a0 /include/libcamera/internal/log.h
parent83c5a2a7aa67b609bc5c14698b76b9eaee644d17 (diff)
libcamera: Utilise LIBCAMERA_DISABLE_COPY
Replace existing use cases where the copy constructor and copy assignment operator are deleted with the LIBCAMERA_DISABLE_COPY statement Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'include/libcamera/internal/log.h')
-rw-r--r--include/libcamera/internal/log.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/libcamera/internal/log.h b/include/libcamera/internal/log.h
index 4b10087a..e76ae913 100644
--- a/include/libcamera/internal/log.h
+++ b/include/libcamera/internal/log.h
@@ -10,6 +10,8 @@
#include <chrono>
#include <sstream>
+#include <libcamera/class.h>
+
#include "libcamera/internal/utils.h"
namespace libcamera {
@@ -57,7 +59,7 @@ public:
LogSeverity severity);
LogMessage(const char *fileName, unsigned int line,
const LogCategory &category, LogSeverity severity);
- LogMessage(const LogMessage &) = delete;
+
LogMessage(LogMessage &&);
~LogMessage();
@@ -70,6 +72,8 @@ public:
const std::string msg() const { return msgStream_.str(); }
private:
+ LIBCAMERA_DISABLE_COPY(LogMessage)
+
void init(const char *fileName, unsigned int line);
std::ostringstream msgStream_;