summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/AllocatableObjectCache.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/IceGrid/AllocatableObjectCache.cpp')
-rw-r--r--cpp/src/IceGrid/AllocatableObjectCache.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/cpp/src/IceGrid/AllocatableObjectCache.cpp b/cpp/src/IceGrid/AllocatableObjectCache.cpp
index f5275da7e43..341d110a56b 100644
--- a/cpp/src/IceGrid/AllocatableObjectCache.cpp
+++ b/cpp/src/IceGrid/AllocatableObjectCache.cpp
@@ -196,7 +196,8 @@ AllocatableObjectCache::allocateByType(const string& type, const ObjectAllocatio
}
vector<AllocatableObjectEntryPtr> objects = p->second.getObjects();
- random_shuffle(objects.begin(), objects.end(), RandomNumberGenerator()); // TODO: OPTIMIZE
+ RandomNumberGenerator rng;
+ random_shuffle(objects.begin(), objects.end(), rng); // TODO: OPTIMIZE
try
{
for(vector<AllocatableObjectEntryPtr>::const_iterator q = objects.begin(); q != objects.end(); ++q)