From 56401a747c20e4c7dc25f578f62cedc794cbd92e Mon Sep 17 00:00:00 2001 From: Thibault Hallouin <thibault.hallouin@inrae.fr> Date: Thu, 1 Dec 2022 17:17:36 +0100 Subject: [PATCH] fix error with gcc on CI: missing explicit type --- tests/test_determinist.cpp | 8 ++++---- tests/test_probabilist.cpp | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/test_determinist.cpp b/tests/test_determinist.cpp index ea12693..41a1aff 100644 --- a/tests/test_determinist.cpp +++ b/tests/test_determinist.cpp @@ -185,8 +185,8 @@ TEST(DeterministTests, TestMaskingConditions) // conditions on streamflow values _________________________________________ // compute scores using masking conditions on streamflow to subset whole record - xt::xtensor<std::array<char, 32>, 1> q_conditions ={ - {"q_obs{<2000,>3000}"} + xt::xtensor<std::array<char, 32>, 1> q_conditions = { + std::array<char, 32> {"q_obs{<2000,>3000}"} }; std::vector<xt::xarray<double>> metrics_q_conditioned = @@ -217,7 +217,7 @@ TEST(DeterministTests, TestMaskingConditions) // compute scores using masking conditions on streamflow to subset whole record xt::xtensor<std::array<char, 32>, 1> q_conditions_ ={ - {"q_obs{>=mean}"} + std::array<char, 32> {"q_obs{>=mean}"} }; double mean = xt::mean(observed, {1})(); @@ -250,7 +250,7 @@ TEST(DeterministTests, TestMaskingConditions) // compute scores using masking conditions on time indices to subset whole record xt::xtensor<std::array<char, 32>, 1> t_conditions = { - {"t{0,1,2,3,4,5:97,97,98,99}"} + std::array<char, 32> {"t{0,1,2,3,4,5:97,97,98,99}"} }; std::vector<xt::xarray<double>> metrics_t_conditioned = diff --git a/tests/test_probabilist.cpp b/tests/test_probabilist.cpp index 655a276..170b373 100644 --- a/tests/test_probabilist.cpp +++ b/tests/test_probabilist.cpp @@ -201,7 +201,7 @@ TEST(ProbabilistTests, TestMaskingConditions) // compute scores using masking conditions on streamflow to subset whole record xt::xtensor<std::array<char, 32>, 2> q_conditions = { - {{"q_obs{<2000,>3000}"}} + {std::array<char, 32> {"q_obs{<2000,>3000}"}} }; std::vector<xt::xarray<double>> metrics_q_conditioned = @@ -234,7 +234,7 @@ TEST(ProbabilistTests, TestMaskingConditions) // compute scores using masking conditions on streamflow to subset whole record xt::xtensor<std::array<char, 32>, 2> q_conditions_ = { - {{"q_prd_mean{>=median}"}} + {std::array<char, 32> {"q_prd_mean{>=median}"}} }; auto q_prd_mean = xt::mean(predicted, {0}, xt::keep_dims); @@ -270,7 +270,7 @@ TEST(ProbabilistTests, TestMaskingConditions) // compute scores using masking conditions on time indices to subset whole record xt::xtensor<std::array<char, 32>, 2> t_conditions = { - {{"t{0,1,2,3,4,5:97,97,98,99}"}} + {std::array<char, 32> {"t{0,1,2,3,4,5:97,97,98,99}"}} }; std::vector<xt::xarray<double>> metrics_t_conditioned = -- GitLab