From 5ef3b5aacfdb1d6ce1aea1251bfc94aa58f57c70 Mon Sep 17 00:00:00 2001 From: annoviko Date: Fri, 4 Oct 2019 11:40:28 +0200 Subject: [PATCH] #550: Remove C++17 functions. --- ccore/src/utils/stats.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ccore/src/utils/stats.hpp b/ccore/src/utils/stats.hpp index e1b0d7f7..7ef15d4a 100755 --- a/ccore/src/utils/stats.hpp +++ b/ccore/src/utils/stats.hpp @@ -74,7 +74,7 @@ double var(const TypeContainer & p_container, const double p_mean) { result += std::pow(value - p_mean, 2); } - result /= (std::size(p_container) - 1); + result /= (p_container.size() - 1); return result; } @@ -141,7 +141,7 @@ std::vector pdf(const TypeContainer & p_container) { double m = 1.0 / std::sqrt(2.0 * ccore::utils::math::pi); std::vector result; - result.reserve(std::size(p_container)); + result.reserve(p_container.size()); for (auto & value : p_container) { result.push_back(m * std::exp(-0.5 * std::pow(value, 2)));