diff options
author | Barnabás Pőcze <pobrn@protonmail.com> | 2025-01-21 19:15:42 +0100 |
---|---|---|
committer | Barnabás Pőcze <pobrn@protonmail.com> | 2025-02-27 11:30:23 +0100 |
commit | aca8457d34e975c0b495636c2a4b8a1fb05e739c (patch) | |
tree | c39eceadffc649b223c2909d66c1861cca74fbde /include | |
parent | 24c2caa1c1b39d0bb17dfaca0aedf9b8e91b5e26 (diff) |
libcamera: base: log: Pass dynamic prefix through
Use move construction to essentially pass through the string
returned by `Loggable::logPrefix()` to avoid an unnecessary copy.
Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/libcamera/base/log.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/libcamera/base/log.h b/include/libcamera/base/log.h index acef2420..1fb92603 100644 --- a/include/libcamera/base/log.h +++ b/include/libcamera/base/log.h @@ -64,7 +64,7 @@ class LogMessage public: LogMessage(const char *fileName, unsigned int line, const LogCategory &category, LogSeverity severity, - const std::string &prefix = std::string()); + std::string prefix = {}); ~LogMessage(); std::ostream &stream() { return msgStream_; } |