diff options
author | Pierre Schweitzer <pierre@reactos.org> | 2012-07-14 15:54:17 (GMT) |
---|---|---|
committer | Pierre Schweitzer <pierre@reactos.org> | 2012-07-14 15:54:17 (GMT) |
commit | df820cf6d4f0c4f5c860690df346b0dce8039e0f (patch) | |
tree | e860fa36b06286b7d214eaa46eb2477a8e874fcf /src/build.cc | |
parent | c7a3e306bea8514d5bbdda8ccc93950752fdeb33 (diff) | |
download | Ninja-df820cf6d4f0c4f5c860690df346b0dce8039e0f.zip Ninja-df820cf6d4f0c4f5c860690df346b0dce8039e0f.tar.gz Ninja-df820cf6d4f0c4f5c860690df346b0dce8039e0f.tar.bz2 |
Efficiently check for emptiness
Diffstat (limited to 'src/build.cc')
-rw-r--r-- | src/build.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/build.cc b/src/build.cc index eed52ae..0fc387c 100644 --- a/src/build.cc +++ b/src/build.cc @@ -465,7 +465,7 @@ void RealCommandRunner::Abort() { bool RealCommandRunner::CanRunMore() { return ((int)subprocs_.running_.size()) < config_.parallelism - && ((subprocs_.running_.size() == 0 || config_.max_load_average <= 0.0f) + && ((subprocs_.running_.empty() || config_.max_load_average <= 0.0f) || GetLoadAverage() < config_.max_load_average); } |