summaryrefslogtreecommitdiffstats
path: root/src/graph.h
diff options
context:
space:
mode:
authorThiago Farina <tfarina@chromium.org>2012-05-06 22:31:16 (GMT)
committerThiago Farina <tfarina@chromium.org>2012-05-06 22:31:16 (GMT)
commit6bbda7cba2c3c6476db39b73c7e901d9eee3b1e6 (patch)
tree27abeffc1b785cec187de5707a15a75d9d992339 /src/graph.h
parent054ff2b69b3d9e317b2ab90dea0695c786efb55f (diff)
downloadNinja-6bbda7cba2c3c6476db39b73c7e901d9eee3b1e6.zip
Ninja-6bbda7cba2c3c6476db39b73c7e901d9eee3b1e6.tar.gz
Ninja-6bbda7cba2c3c6476db39b73c7e901d9eee3b1e6.tar.bz2
views: Mark single-argument constructors as explicit.
This was reported by cpplint as: python ~/depot_tools/cpplint.py 2>&1 | grep -v "Done processing" | grep explicit Signed-off-by: Thiago Farina <tfarina@chromium.org>
Diffstat (limited to 'src/graph.h')
-rw-r--r--src/graph.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/graph.h b/src/graph.h
index afe4daf..32a859d 100644
--- a/src/graph.h
+++ b/src/graph.h
@@ -28,8 +28,11 @@ struct Edge;
/// Information about a node in the dependency graph: the file, whether
/// it's dirty, mtime, etc.
struct Node {
- Node(const string& path) : path_(path), mtime_(-1), dirty_(false),
- in_edge_(NULL) {}
+ explicit Node(const string& path)
+ : path_(path),
+ mtime_(-1),
+ dirty_(false),
+ in_edge_(NULL) {}
/// Return true if the file exists (mtime_ got a value).
bool Stat(DiskInterface* disk_interface);
@@ -97,7 +100,8 @@ private:
/// An invokable build command and associated metadata (description, etc.).
struct Rule {
- Rule(const string& name) : name_(name), generator_(false), restat_(false) { }
+ explicit Rule(const string& name)
+ : name_(name), generator_(false), restat_(false) {}
const string& name() const { return name_; }