folly/test/TimeseriesTest.cpp: avoid shadowing warnings v2017.03.20.00
authorJim Meyering <meyering@fb.com>
Sun, 19 Mar 2017 02:53:26 +0000 (19:53 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Sun, 19 Mar 2017 03:05:33 +0000 (20:05 -0700)
Summary:
Fix warnings exposed by gcc's -Wshadow-compatible-local.
Rename lambda parameter "ts" to "timeSeries".

This avoids the following errors:

  folly/test/TimeseriesTest.cpp:802:27: error: declaration of 'ts' shadows a previous local [-Werror=shadow-compatible-local]
  folly/test/TimeseriesTest.cpp:809:31: error: shadowed declaration is here [-Werror=shadow-compatible-local]

Reviewed By: yfeldblum, liuxuli

Differential Revision: D4735180

fbshipit-source-id: 59b3fecf4031b3c6615e5b764fbc4ea04754eb50

folly/test/TimeseriesTest.cpp

index 27e7311..02e8659 100644 (file)
@@ -799,10 +799,10 @@ TEST(BucketedTimeSeries, addHistorical) {
 }
 
 TEST(BucketedTimeSeries, reConstructEmptyTimeSeries) {
-  auto verify = [](auto ts) {
-    EXPECT_TRUE(ts.empty());
-    EXPECT_EQ(0, ts.sum());
-    EXPECT_EQ(0, ts.count());
+  auto verify = [](auto timeSeries) {
+    EXPECT_TRUE(timeSeries.empty());
+    EXPECT_EQ(0, timeSeries.sum());
+    EXPECT_EQ(0, timeSeries.count());
   };
 
   // Create a 100 second timeseries with 10 buckets_