From 4d6dfd5597ccf44c0e5b1fab6220ea2adf251959 Mon Sep 17 00:00:00 2001 From: dan sinclair Date: Wed, 20 Apr 2022 00:36:54 +0000 Subject: [PATCH] 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 Reviewed-by: Corentin Wallez Commit-Queue: Dan Sinclair --- src/dawn/common/Log.cpp | 8 ++++---- src/dawn/common/Log.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/dawn/common/Log.cpp b/src/dawn/common/Log.cpp index 1505f96e93..9e6edbe255 100644 --- a/src/dawn/common/Log.cpp +++ b/src/dawn/common/Log.cpp @@ -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) { diff --git a/src/dawn/common/Log.h b/src/dawn/common/Log.h index d2b4fdbcc8..fc7481a3f9 100644 --- a/src/dawn/common/Log.h +++ b/src/dawn/common/Log.h @@ -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;