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>
This commit is contained in:
@@ -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_; }
|
||||
|
||||
Reference in New Issue
Block a user