Skip to content

Commit

Permalink
Avoid implicit cast LoadStatus -> bool
Browse files Browse the repository at this point in the history
  • Loading branch information
jhasse committed Apr 9, 2021
1 parent 721f5e9 commit ce70048
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/build_log_perftest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ int main() {
{
// Read once to warm up disk cache.
BuildLog log;
if (!log.Load(kTestFilename, &err)) {
if (log.Load(kTestFilename, &err) == LOAD_ERROR) {
fprintf(stderr, "Failed to read test data: %s\n", err.c_str());
return 1;
}
Expand All @@ -121,7 +121,7 @@ int main() {
for (int i = 0; i < kNumRepetitions; ++i) {
int64_t start = GetTimeMillis();
BuildLog log;
if (!log.Load(kTestFilename, &err)) {
if (log.Load(kTestFilename, &err) == LOAD_ERROR) {
fprintf(stderr, "Failed to read test data: %s\n", err.c_str());
return 1;
}
Expand All @@ -148,4 +148,3 @@ int main() {

return 0;
}

0 comments on commit ce70048

Please sign in to comment.