Use double braces for std::array init to avoid warning.

Warning triggered at least using clang.
This commit is contained in:
Atgeirr Flø Rasmussen 2014-09-01 10:09:27 +02:00
parent 18304eb54d
commit c55a887904

View File

@ -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<double,3>::size_type d = 3;
std::array<double,3>
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<double,3>::size_type d = extent.size();
std::array<double,3>
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;
}