From 93561ab3b902746f679f8ef7ac73b9d069c322e8 Mon Sep 17 00:00:00 2001 From: Chih-Hung Hsieh Date: Thu, 20 Dec 2018 13:54:17 -0800 Subject: [PATCH] Fix/suppress tools google-explicit-constructor warnings * Add explicit to conversion constructors/operators * Remove redundant explicit of copy constructors Bug: 28341362 Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,google-explicit-constructor Change-Id: Ic11c22c59beb7aa32b878a23315b1036ca4e3c6a --- tools/bit/command.h | 2 +- tools/streaming_proto/Errors.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/bit/command.h b/tools/bit/command.h index fb44900b0806f..dd7103e10fe75 100644 --- a/tools/bit/command.h +++ b/tools/bit/command.h @@ -25,7 +25,7 @@ using namespace std; struct Command { - Command(const string& prog); + explicit Command(const string& prog); ~Command(); void AddArg(const string& arg); diff --git a/tools/streaming_proto/Errors.h b/tools/streaming_proto/Errors.h index f14bbfd55b5fd..bddd9819e8f59 100644 --- a/tools/streaming_proto/Errors.h +++ b/tools/streaming_proto/Errors.h @@ -11,7 +11,7 @@ using namespace std; struct Error { Error(); - explicit Error(const Error& that); + Error(const Error& that); Error(const string& filename, int lineno, const char* message); string filename;