From d40250e03b172ecc5f81299499ea0901f3d5b16d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Tue, 21 Jan 2025 13:12:54 +0100 Subject: libcamera: base: log: Remove move constructor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit C++17 guarantees move and copy elision in certain cases, such as when returning a prvalue of the same type as the return type of the function. This is what the `_log()` functions do, thus there is no need for the move constructor, so remove it. Furthermore, do not just remove the implementation, but instead delete it as well. Signed-off-by: Barnabás Pőcze Reviewed-by: Jacopo Mondi Reviewed-by: Laurent Pinchart --- include/libcamera/base/log.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'include') diff --git a/include/libcamera/base/log.h b/include/libcamera/base/log.h index 62093012..b3050eed 100644 --- a/include/libcamera/base/log.h +++ b/include/libcamera/base/log.h @@ -61,8 +61,6 @@ public: LogMessage(const char *fileName, unsigned int line, const LogCategory &category, LogSeverity severity, const std::string &prefix = std::string()); - - LogMessage(LogMessage &&); ~LogMessage(); std::ostream &stream() { return msgStream_; } @@ -75,7 +73,7 @@ public: const std::string msg() const { return msgStream_.str(); } private: - LIBCAMERA_DISABLE_COPY(LogMessage) + LIBCAMERA_DISABLE_COPY_AND_MOVE(LogMessage) void init(const char *fileName, unsigned int line); -- cgit v1.2.1