From 555fc9d3d5ed2599a111c83705c7a5afe2eb7f71 Mon Sep 17 00:00:00 2001 From: ariel- Date: Mon, 5 Jun 2017 03:29:02 -0300 Subject: Core/Utils: restored previous behaviour of RandomResize (cherry picked from commit 8188511759c6613d33111ab59f4af3c441d01c8b) --- src/common/Utilities/Containers.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src') diff --git a/src/common/Utilities/Containers.h b/src/common/Utilities/Containers.h index 0a437b0e4d8..a2b42011bd8 100644 --- a/src/common/Utilities/Containers.h +++ b/src/common/Utilities/Containers.h @@ -71,12 +71,10 @@ namespace Trinity { //! First use predicate filter C containerCopy; + std::copy_if(std::begin(container), std::end(container), std::inserter(containerCopy, std::end(containerCopy)), predicate); if (requestedSize) - { - std::copy_if(std::begin(container), std::end(container), std::inserter(containerCopy, std::end(containerCopy)), predicate); RandomResize(containerCopy, requestedSize); - } container = std::move(containerCopy); } -- cgit v1.2.3