Fix copyright lines
[folly.git] / folly / test / AsciiCaseInsensitiveBenchmark.cpp
index a916f4e573f3b0a4746084b5b92a249b212e106a..d9d86da3367215befe108a449986f6ed19e56f37 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2015 Facebook, Inc.
+ * Copyright 2014-present Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -80,7 +80,7 @@ string lorem_ipsum =
 "vulputate quam urna quis eros. Donec vel."
 "\n";
 
-string needle = "commodo";
+const string needle = "commodo";
 
 // legacy implementation
 struct AsciiCaseInsensitiveLegacy {
@@ -89,7 +89,7 @@ struct AsciiCaseInsensitiveLegacy {
   }
 };
 
-template<typename Cmp>
+template <typename Cmp>
 inline void test_operator_on_search(int iters) {
   Cmp cmp;
   int dummy = 0;
@@ -100,6 +100,7 @@ inline void test_operator_on_search(int iters) {
       cmp
     ) - lorem_ipsum.begin();
   }
+  doNotOptimizeAway(dummy);
 }
 
 BENCHMARK(LegacyCaseInsensitiveCheck, iters) {