From 071228fe3646542d79ce2a00697a72545eafa59b Mon Sep 17 00:00:00 2001 From: Dmitri Naumov <dmitri.naumov@ufz.de> Date: Mon, 16 Sep 2013 18:19:45 +0200 Subject: [PATCH] [TMeL] Replace initializer list with explicit result. --- Tests/MeshLib/TestQuadMesh.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Tests/MeshLib/TestQuadMesh.cpp b/Tests/MeshLib/TestQuadMesh.cpp index 251660c1289..f8fdd7e893b 100644 --- a/Tests/MeshLib/TestQuadMesh.cpp +++ b/Tests/MeshLib/TestQuadMesh.cpp @@ -52,14 +52,20 @@ class MeshLibQuadMesh : public ::testing::Test typedef std::list<std::size_t> Indices; Indices getNeighbor(std::size_t const i) const { + std::list<std::size_t> result; switch (i) { case 0: - return std::list<std::size_t>{i + 1}; + result.push_back(i + 1); + break; case elements_stride: - return std::list<std::size_t>{i - 1}; + result.push_back(i - 1); + break; default: - return std::list<std::size_t>{i - 1, i + 1}; + result.push_back(i - 1); + result.push_back(i + 1); + break; } + return result; } template <typename F> -- GitLab