changeset 26989:7d590b464e88

Fix shadowing of local variables.
author Pavel Jan?k <Pavel@Janik.cz>
date Wed, 15 Mar 2017 15:40:37 +0100
parents 1c4ede4e0e1e
children 07b25db0156d
files src/test/checkqueue_tests.cpp
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/test/checkqueue_tests.cpp	Wed Mar 08 22:13:15 2017 +0100
+++ b/src/test/checkqueue_tests.cpp	Wed Mar 15 15:40:37 2017 +0100
@@ -46,7 +46,7 @@
 
 struct FailingCheck {
     bool fails;
-    FailingCheck(bool fails) : fails(fails){};
+    FailingCheck(bool _fails) : fails(_fails){};
     FailingCheck() : fails(true){};
     bool operator()()
     {
@@ -411,15 +411,15 @@
             std::unique_lock<std::mutex> l(m);
             tg.create_thread([&]{
                     CCheckQueueControl<FakeCheck> control(queue.get());
-                    std::unique_lock<std::mutex> l(m);
+                    std::unique_lock<std::mutex> ll(m);
                     has_lock = true;
                     cv.notify_one();
-                    cv.wait(l, [&]{return has_tried;});
+                    cv.wait(ll, [&]{return has_tried;});
                     done = true;
                     cv.notify_one();
                     // Wait until the done is acknowledged
                     //
-                    cv.wait(l, [&]{return done_ack;});
+                    cv.wait(ll, [&]{return done_ack;});
                     });
             // Wait for thread to get the lock
             cv.wait(l, [&](){return has_lock;});