From d326f75641b545900dcb504d4dcd8cf18d918a2c Mon Sep 17 00:00:00 2001
From: Bernhard Manfred Gruber <bernhardmgruber@gmail.com>
Date: Thu, 21 Jan 2021 14:52:55 +0100
Subject: [PATCH] remove redundant initialization of std::vector elements
---
code/move/solution/trymove.sol.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/code/move/solution/trymove.sol.cpp b/code/move/solution/trymove.sol.cpp
index 2cc78a0..d8d0c3f 100644
--- a/code/move/solution/trymove.sol.cpp
+++ b/code/move/solution/trymove.sol.cpp
@@ -26,8 +26,7 @@ template<class T>
std::vector<T> getRandomVector(int len) {
// allocate vectors
std::vector<T> v(len);
- // fill and randomize v
- for (int i = 0; i < len; i++) v[i] = T();
+ // randomize v
randomize(v);
return v;
}
--
GitLab