From c55a8879048e74acf0829eecb1a99a8539cc500f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atgeirr=20Fl=C3=B8=20Rasmussen?= Date: Mon, 1 Sep 2014 10:09:27 +0200 Subject: [PATCH] Use double braces for std::array init to avoid warning. Warning triggered at least using clang. --- opm/core/wells/WellsManager.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/opm/core/wells/WellsManager.cpp b/opm/core/wells/WellsManager.cpp index 9c2eacc2..03dd589d 100644 --- a/opm/core/wells/WellsManager.cpp +++ b/opm/core/wells/WellsManager.cpp @@ -180,13 +180,13 @@ namespace WellsManagerDetail switch (direction) { case Opm::CompletionDirection::DirectionEnum::X: - return permutation { idx_t(1), idx_t(2), idx_t(0) }; + return permutation {{ idx_t(1), idx_t(2), idx_t(0) }}; case Opm::CompletionDirection::DirectionEnum::Y: - return permutation { idx_t(2), idx_t(0), idx_t(1) }; + return permutation {{ idx_t(2), idx_t(0), idx_t(1) }}; case Opm::CompletionDirection::DirectionEnum::Z: - return permutation { idx_t(0), idx_t(1), idx_t(2) }; + return permutation {{ idx_t(0), idx_t(1), idx_t(2) }}; } } @@ -200,9 +200,9 @@ namespace WellsManagerDetail const std::array::size_type d = 3; std::array - K = { perm[ p[0]*(d + 1) ] , - perm[ p[1]*(d + 1) ] , - perm[ p[2]*(d + 1) ] }; + K = {{ perm[ p[0]*(d + 1) ] , + perm[ p[1]*(d + 1) ] , + perm[ p[2]*(d + 1) ] }}; return K; } @@ -224,9 +224,9 @@ namespace WellsManagerDetail const std::array::size_type d = extent.size(); std::array - D = { extent[ p[0]*(d + 1) ] , - extent[ p[1]*(d + 1) ] , - extent[ p[2]*(d + 1) ] }; + D = {{ extent[ p[0]*(d + 1) ] , + extent[ p[1]*(d + 1) ] , + extent[ p[2]*(d + 1) ] }}; return D; }