summaryrefslogtreecommitdiffstats
path: root/src/build.h
diff options
context:
space:
mode:
authorPeter Bell <peterbell10@live.co.uk>2022-03-07 16:48:04 (GMT)
committerPeter Bell <peterbell10@live.co.uk>2022-03-07 16:48:04 (GMT)
commit24d1f5f0c130338b382c60eb32731d2638b47d03 (patch)
treef792b61b1ad9307d36ff83f1eb9e3d31b31fae19 /src/build.h
parent77448b4fb7dc1e8baad0cc75c4d6d04fabc21def (diff)
downloadNinja-24d1f5f0c130338b382c60eb32731d2638b47d03.zip
Ninja-24d1f5f0c130338b382c60eb32731d2638b47d03.tar.gz
Ninja-24d1f5f0c130338b382c60eb32731d2638b47d03.tar.bz2
Address review comments
1. Move EdgePriorityQueue to graph.h and inherit from priority_queue 2. Add comment about edge->critical_time()
Diffstat (limited to 'src/build.h')
-rw-r--r--src/build.h36
1 files changed, 0 insertions, 36 deletions
diff --git a/src/build.h b/src/build.h
index 9b49ffb..652bc40 100644
--- a/src/build.h
+++ b/src/build.h
@@ -18,7 +18,6 @@
#include <cstdio>
#include <map>
#include <memory>
-#include <queue>
#include <string>
#include <vector>
@@ -36,41 +35,6 @@ struct State;
struct Status;
-// Set of ready edges, sorted by priority
-class EdgeQueue {
- struct EdgePriorityCompare {
- bool operator()(const Edge* e1, const Edge* e2) const;
- };
-
- std::priority_queue<Edge*, std::vector<Edge*>, EdgePriorityCompare> queue_;
-
- public:
- void push(Edge* edge) {
- queue_.push(edge);
- }
-
- template <typename It>
- void push(It first, It last) {
- for (; first != last; ++first) {
- push(*first);
- }
- }
-
- Edge* pop() {
- Edge* ret = queue_.top();
- queue_.pop();
- return ret;
- }
-
- void clear() {
- queue_ = std::priority_queue<Edge*, std::vector<Edge*>, EdgePriorityCompare>();
- }
-
- size_t size() const { return queue_.size(); }
-
- bool empty() const { return queue_.empty(); }
-};
-
/// Plan stores the state of a build plan: what we intend to build,
/// which steps we're ready to execute.
struct Plan {