summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPeter Bell <peterbell10@live.co.uk>2021-08-25 19:53:28 (GMT)
committerPeter Bell <peterbell10@live.co.uk>2021-08-25 22:44:25 (GMT)
commitc5d355cbb766a6bbce517dbd914dc671cea526b3 (patch)
tree58144afb07ee4ccba141c8897c1c866c710c432b /src
parent2fcf403ac54d77d7dc8d582c28aa86a911428da4 (diff)
downloadNinja-c5d355cbb766a6bbce517dbd914dc671cea526b3.zip
Ninja-c5d355cbb766a6bbce517dbd914dc671cea526b3.tar.gz
Ninja-c5d355cbb766a6bbce517dbd914dc671cea526b3.tar.bz2
clang-format diff
Diffstat (limited to 'src')
-rw-r--r--src/build.cc9
-rw-r--r--src/build.h12
-rw-r--r--src/graph.h8
3 files changed, 12 insertions, 17 deletions
diff --git a/src/build.cc b/src/build.cc
index a4dfc01..8b638b7 100644
--- a/src/build.cc
+++ b/src/build.cc
@@ -450,8 +450,7 @@ struct SeenNodeBefore {
} // namespace
void Plan::ComputeCriticalTime(BuildLog* build_log) {
-
- //testcase have no build_log
+ // testcases have no build_log
if (!build_log)
return;
@@ -459,9 +458,9 @@ void Plan::ComputeCriticalTime(BuildLog* build_log) {
// Remove duplicate targets
{
std::set<const Node*> seen;
- targets_.erase(
- std::remove_if(targets_.begin(), targets_.end(), SeenNodeBefore{&seen}),
- targets_.end());
+ targets_.erase(std::remove_if(targets_.begin(), targets_.end(),
+ SeenNodeBefore{ &seen }),
+ targets_.end());
}
// this is total time if building all edges in serial, so this value is big
diff --git a/src/build.h b/src/build.h
index ec6deea..410c2db 100644
--- a/src/build.h
+++ b/src/build.h
@@ -47,8 +47,7 @@ class EdgeQueue {
// Set to ensure no duplicate entries in ready_
EdgeSet set_;
-public:
-
+ public:
void push(Edge* edge) {
if (set_.insert(edge).second) {
queue_.push(edge);
@@ -76,16 +75,11 @@ public:
}
}
- size_t size() const {
- return queue_.size();
- }
+ size_t size() const { return queue_.size(); }
- bool empty() const {
- return queue_.empty();
- }
+ 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 {
diff --git a/src/graph.h b/src/graph.h
index 1bc79fa..b66ae6b 100644
--- a/src/graph.h
+++ b/src/graph.h
@@ -148,8 +148,8 @@ struct Edge {
: rule_(NULL), pool_(NULL), dyndep_(NULL), env_(NULL), mark_(VisitNone),
id_(0), run_time_ms_(0), critical_time_(-1), outputs_ready_(false),
deps_loaded_(false), deps_missing_(false),
- generated_by_dep_loader_(false), implicit_deps_(0),
- order_only_deps_(0), implicit_outs_(0) {}
+ generated_by_dep_loader_(false), implicit_deps_(0), order_only_deps_(0),
+ implicit_outs_(0) {}
/// Return true if all inputs' in-edges are ready.
bool AllInputsReady() const;
@@ -173,7 +173,9 @@ struct Edge {
void Dump(const char* prefix="") const;
int64_t critical_time() const { return critical_time_; }
- void set_critical_time(int64_t critical_time) { critical_time_ = critical_time; }
+ void set_critical_time(int64_t critical_time) {
+ critical_time_ = critical_time;
+ }
const Rule* rule_;
Pool* pool_;