]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2202] The vector must be a reference
authorMichal 'vorner' Vaner <michal.vaner@nic.cz>
Mon, 1 Oct 2012 14:20:33 +0000 (16:20 +0200)
committerMichal 'vorner' Vaner <michal.vaner@nic.cz>
Mon, 1 Oct 2012 14:20:33 +0000 (16:20 +0200)
Otherwise, each thread would get its own copy of it, messing with it
privately, not causing any need for locking.

src/lib/util/threads/tests/lock_unittest.cc

index cc959f5433f873298a0c7216b809a262de912c37..d6579d8e913f11bf3d4cc9704612bea1ddb6f732 100644 (file)
@@ -79,7 +79,7 @@ const unsigned long long length = 1000;
 const unsigned long long iterations = 10000;
 const unsigned long long value = 2000;
 void
-performStrangeOperation(std::vector<long long unsigned> array, int direction,
+performStrangeOperation(std::vector<long long unsigned>& array, int direction,
                         Mutex* mutex)
 {
     unsigned long long position = 0;