summaryrefslogtreecommitdiffstats
path: root/src/graph.h
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2011-12-07 17:27:01 (GMT)
committerEvan Martin <martine@danga.com>2011-12-07 17:27:01 (GMT)
commitd27d21a8c38debfd69c1deaa302cdb500511e0af (patch)
tree43e35e5b2ed2765db42af7944e48c1cf2593e106 /src/graph.h
parentf66f2e80eee4a9df52b9f3f0298548c039d1d122 (diff)
downloadNinja-d27d21a8c38debfd69c1deaa302cdb500511e0af.zip
Ninja-d27d21a8c38debfd69c1deaa302cdb500511e0af.tar.gz
Ninja-d27d21a8c38debfd69c1deaa302cdb500511e0af.tar.bz2
make Node::dirty_ private
Diffstat (limited to 'src/graph.h')
-rw-r--r--src/graph.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/graph.h b/src/graph.h
index a52a3d7..694cf35 100644
--- a/src/graph.h
+++ b/src/graph.h
@@ -65,19 +65,25 @@ struct Node {
time_t mtime() const { return mtime_; }
bool dirty() const { return dirty_; }
+ void set_dirty(bool dirty) { dirty_ = dirty; }
+ void MarkDirty() { dirty_ = true; }
private:
string path_;
- // Possible values of mtime_:
- // -1: file hasn't been examined
- // 0: we looked, and file doesn't exist
- // >0: actual file's mtime
+ /// Possible values of mtime_:
+ /// -1: file hasn't been examined
+ /// 0: we looked, and file doesn't exist
+ /// >0: actual file's mtime
time_t mtime_;
+ /// Dirty is true when the underlying file is out-of-date.
+ /// But note that Edge::outputs_ready_ is also used in judging which
+ /// edges to build.
+ bool dirty_;
+
// TODO: make these private as well. But don't just blindly add
// setters/getters, instead pay attention to the proper API.
public:
- bool dirty_;
Edge* in_edge_;
vector<Edge*> out_edges_;
};