summaryrefslogtreecommitdiffstats
path: root/src/build.h
diff options
context:
space:
mode:
authorKonstantin Kharlamov <Hi-Angel@yandex.ru>2019-10-22 16:59:29 (GMT)
committerKonstantin Kharlamov <Hi-Angel@yandex.ru>2019-11-20 21:40:11 (GMT)
commit2492fcbd912c8aa8f9e4e2258d9aa1e6f683a992 (patch)
treef19ba24fd5e0acad29b84d97d84bce76801f202f /src/build.h
parent5fe25d2e03ffe71717df3e422303ee1973567d9f (diff)
downloadNinja-2492fcbd912c8aa8f9e4e2258d9aa1e6f683a992.zip
Ninja-2492fcbd912c8aa8f9e4e2258d9aa1e6f683a992.tar.gz
Ninja-2492fcbd912c8aa8f9e4e2258d9aa1e6f683a992.tar.bz2
build.cc: constify a few Plan functions
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
Diffstat (limited to 'src/build.h')
-rw-r--r--src/build.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/build.h b/src/build.h
index 410d4a5..322291f 100644
--- a/src/build.h
+++ b/src/build.h
@@ -46,7 +46,7 @@ struct Plan {
/// Add a target to our plan (including all its dependencies).
/// Returns false if we don't need to build this target; may
/// fill in |err| with an error message if there's a problem.
- bool AddTarget(Node* node, string* err);
+ bool AddTarget(const Node* node, string* err);
// Pop a ready edge off the queue of edges to build.
// Returns NULL if there's no work to do.
@@ -56,7 +56,7 @@ struct Plan {
bool more_to_do() const { return wanted_edges_ > 0 && command_edges_ > 0; }
/// Dumps the current state of the plan.
- void Dump();
+ void Dump() const;
enum EdgeResult {
kEdgeFailed,
@@ -81,12 +81,12 @@ struct Plan {
/// Update the build plan to account for modifications made to the graph
/// by information loaded from a dyndep file.
- bool DyndepsLoaded(DependencyScan* scan, Node* node,
+ bool DyndepsLoaded(DependencyScan* scan, const Node* node,
const DyndepFile& ddf, string* err);
private:
- bool RefreshDyndepDependents(DependencyScan* scan, Node* node, string* err);
- void UnmarkDependents(Node* node, set<Node*>* dependents);
- bool AddSubTarget(Node* node, Node* dependent, string* err,
+ bool RefreshDyndepDependents(DependencyScan* scan, const Node* node, string* err);
+ void UnmarkDependents(const Node* node, set<Node*>* dependents);
+ bool AddSubTarget(const Node* node, const Node* dependent, string* err,
set<Edge*>* dyndep_walk);
/// Update plan with knowledge that the given node is up to date.