Convert LogMessage to explicit.

This CL adds explicit and fixes up the various call sites for the
LogMessage class.

Bug: dawn:1339
Change-Id: Id244d0e31929d31346af48e116a40e7079a50372
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86872
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This commit is contained in:
dan sinclair 2022-04-20 00:36:54 +00:00 committed by Dawn LUCI CQ
parent 529747b041
commit 4d6dfd5597
2 changed files with 5 additions and 5 deletions

View File

@ -92,19 +92,19 @@ namespace dawn {
}
LogMessage DebugLog() {
return {LogSeverity::Debug};
return LogMessage(LogSeverity::Debug);
}
LogMessage InfoLog() {
return {LogSeverity::Info};
return LogMessage(LogSeverity::Info);
}
LogMessage WarningLog() {
return {LogSeverity::Warning};
return LogMessage(LogSeverity::Warning);
}
LogMessage ErrorLog() {
return {LogSeverity::Error};
return LogMessage(LogSeverity::Error);
}
LogMessage DebugLog(const char* file, const char* function, int line) {

View File

@ -59,7 +59,7 @@ namespace dawn {
// Essentially an ostringstream that will print itself in its destructor.
class LogMessage {
public:
LogMessage(LogSeverity severity);
explicit LogMessage(LogSeverity severity);
~LogMessage();
LogMessage(LogMessage&& other) = default;