summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2020-06-03 02:39:55 (GMT)
committerRosen Penev <rosenp@gmail.com>2020-12-06 06:15:54 (GMT)
commit0351d68f0a6bf326126b8e537c788c486b46aa14 (patch)
tree9b0cc36cd0495fd74f0b8494f7be590cd8d07190 /src
parent7cff4770b553e8a1a1eab9aefe093c6b95bdebb4 (diff)
downloadNinja-0351d68f0a6bf326126b8e537c788c486b46aa14.zip
Ninja-0351d68f0a6bf326126b8e537c788c486b46aa14.tar.gz
Ninja-0351d68f0a6bf326126b8e537c788c486b46aa14.tar.bz2
[clang-tidy] add explicit to single argument constructors
Found with google-explicit-constructor Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/build_test.cc7
-rw-r--r--src/graph.cc2
2 files changed, 4 insertions, 5 deletions
diff --git a/src/build_test.cc b/src/build_test.cc
index 078080d..0baabc4 100644
--- a/src/build_test.cc
+++ b/src/build_test.cc
@@ -490,10 +490,9 @@ struct BuildTest : public StateTestWithBuiltinRules, public BuildLogUser {
status_(config_) {
}
- BuildTest(DepsLog* log) : config_(MakeConfig()), command_runner_(&fs_),
- builder_(&state_, config_, NULL, log, &fs_),
- status_(config_) {
- }
+ explicit BuildTest(DepsLog* log)
+ : config_(MakeConfig()), command_runner_(&fs_),
+ builder_(&state_, config_, NULL, log, &fs_), status_(config_) {}
virtual void SetUp() {
StateTestWithBuiltinRules::SetUp();
diff --git a/src/graph.cc b/src/graph.cc
index ea11360..78d0d49 100644
--- a/src/graph.cc
+++ b/src/graph.cc
@@ -515,7 +515,7 @@ bool ImplicitDepLoader::LoadDeps(Edge* edge, string* err) {
}
struct matches {
- matches(std::vector<StringPiece>::iterator i) : i_(i) {}
+ explicit matches(std::vector<StringPiece>::iterator i) : i_(i) {}
bool operator()(const Node* node) const {
StringPiece opath = StringPiece(node->path());