aboutsummaryrefslogtreecommitdiff
path: root/src/common/Utilities/Containers.h
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2018-11-07 20:27:22 +0100
committerShauren <shauren.trinity@gmail.com>2018-11-07 20:27:22 +0100
commit3f1197855fc5575fd83533e6b2132b052c2517b2 (patch)
tree74fef5ec9c388789d85739d22234d1f6cfa14dd7 /src/common/Utilities/Containers.h
parent9d210476e57949094fdd286001ef4900564edca5 (diff)
Core/Utils: Avoid unneccessary container copy
Diffstat (limited to 'src/common/Utilities/Containers.h')
-rw-r--r--src/common/Utilities/Containers.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/Utilities/Containers.h b/src/common/Utilities/Containers.h
index 581fbfabe6b..fb952c89b24 100644
--- a/src/common/Utilities/Containers.h
+++ b/src/common/Utilities/Containers.h
@@ -102,7 +102,7 @@ namespace Trinity
* Note: container cannot be empty
*/
template<class C>
- inline auto SelectRandomWeightedContainerElement(C const& container, std::vector<double> weights) -> decltype(std::begin(container))
+ inline auto SelectRandomWeightedContainerElement(C const& container, std::vector<double> const& weights) -> decltype(std::begin(container))
{
auto it = std::begin(container);
std::advance(it, urandweighted(weights.size(), weights.data()));