Skip to content

Commit 9ad680a

Browse files
committed
clang-format diff
1 parent cf09641 commit 9ad680a

File tree

3 files changed

+12
-17
lines changed

3 files changed

+12
-17
lines changed

src/build.cc

+4-5
Original file line numberDiff line numberDiff line change
@@ -450,18 +450,17 @@ struct SeenNodeBefore {
450450
} // namespace
451451

452452
void Plan::ComputeCriticalTime(BuildLog* build_log) {
453-
454-
//testcase have no build_log
453+
// testcases have no build_log
455454
if (!build_log)
456455
return;
457456

458457
METRIC_RECORD("ComputePriorityList");
459458
// Remove duplicate targets
460459
{
461460
std::set<const Node*> seen;
462-
targets_.erase(
463-
std::remove_if(targets_.begin(), targets_.end(), SeenNodeBefore{&seen}),
464-
targets_.end());
461+
targets_.erase(std::remove_if(targets_.begin(), targets_.end(),
462+
SeenNodeBefore{ &seen }),
463+
targets_.end());
465464
}
466465

467466
// this is total time if building all edges in serial, so this value is big

src/build.h

+3-9
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ class EdgeQueue {
4747
// Set to ensure no duplicate entries in ready_
4848
EdgeSet set_;
4949

50-
public:
51-
50+
public:
5251
void push(Edge* edge) {
5352
if (set_.insert(edge).second) {
5453
queue_.push(edge);
@@ -76,16 +75,11 @@ class EdgeQueue {
7675
}
7776
}
7877

79-
size_t size() const {
80-
return queue_.size();
81-
}
78+
size_t size() const { return queue_.size(); }
8279

83-
bool empty() const {
84-
return queue_.empty();
85-
}
80+
bool empty() const { return queue_.empty(); }
8681
};
8782

88-
8983
/// Plan stores the state of a build plan: what we intend to build,
9084
/// which steps we're ready to execute.
9185
struct Plan {

src/graph.h

+5-3
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ struct Edge {
148148
: rule_(NULL), pool_(NULL), dyndep_(NULL), env_(NULL), mark_(VisitNone),
149149
id_(0), run_time_ms_(0), critical_time_(-1), outputs_ready_(false),
150150
deps_loaded_(false), deps_missing_(false),
151-
generated_by_dep_loader_(false), implicit_deps_(0),
152-
order_only_deps_(0), implicit_outs_(0) {}
151+
generated_by_dep_loader_(false), implicit_deps_(0), order_only_deps_(0),
152+
implicit_outs_(0) {}
153153

154154
/// Return true if all inputs' in-edges are ready.
155155
bool AllInputsReady() const;
@@ -173,7 +173,9 @@ struct Edge {
173173
void Dump(const char* prefix="") const;
174174

175175
int64_t critical_time() const { return critical_time_; }
176-
void set_critical_time(int64_t critical_time) { critical_time_ = critical_time; }
176+
void set_critical_time(int64_t critical_time) {
177+
critical_time_ = critical_time;
178+
}
177179

178180
const Rule* rule_;
179181
Pool* pool_;

0 commit comments

Comments
 (0)