Browse Source

[2202] The vector must be a reference

Otherwise, each thread would get its own copy of it, messing with it
privately, not causing any need for locking.
Michal 'vorner' Vaner 12 years ago
parent
commit
0ca39bfe35
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/lib/util/threads/tests/lock_unittest.cc

+ 1 - 1
src/lib/util/threads/tests/lock_unittest.cc

@@ -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;