Making folly/Benchmark.cpp clangable
authorMarcelo Juchem <marcelo@fb.com>
Wed, 26 Feb 2014 23:46:51 +0000 (15:46 -0800)
committerDave Watson <davejwatson@fb.com>
Mon, 10 Mar 2014 20:50:12 +0000 (13:50 -0700)
Summary: trunk fails to compile under clang: https://phabricator.fb.com/P6426175

Test Plan: ran some benchmarks and checked output

Reviewed By: andrei.alexandrescu@fb.com

FB internal diff: D1192933

folly/Benchmark.cpp

index 5de2c0d494fe425b33b9f1bd87eba797e1da78e0..171a0e02d42dfbc0fcfbb61402d9f79731248203 100644 (file)
@@ -424,7 +424,7 @@ void runBenchmarks() {
     get<2>(benchmarks.front()), 0);
   FOR_EACH_RANGE (i, 1, benchmarks.size()) {
     double elapsed = 0.0;
-    if (strcmp(get<1>(benchmarks[i]), "-")) { // skip separators
+    if (strcmp(get<1>(benchmarks[i]), "-") != 0) { // skip separators
       if (bmRegex && !boost::regex_search(get<1>(benchmarks[i]), *bmRegex)) {
         continue;
       }