From ed514577d9efe769e30d7e5d468b012888a819d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Guti=C3=A9rrez=20Men=C3=A9ndez?= <d.gutierrezmenendez@gsi.de> Date: Thu, 14 Nov 2024 17:09:09 +0000 Subject: [PATCH] Fix missing header in CaConfigReader. #3470 --- algo/ca/core/pars/CaConfigReader.h | 1 + algo/ca/core/utils/CaVector.h | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/algo/ca/core/pars/CaConfigReader.h b/algo/ca/core/pars/CaConfigReader.h index e13ffd807f..d2d4b2cbe3 100644 --- a/algo/ca/core/pars/CaConfigReader.h +++ b/algo/ca/core/pars/CaConfigReader.h @@ -11,6 +11,7 @@ #include "CaIteration.h" +#include <functional> #include <string> #include <unordered_map> #include <vector> diff --git a/algo/ca/core/utils/CaVector.h b/algo/ca/core/utils/CaVector.h index 16fee44c40..76953d2d5f 100644 --- a/algo/ca/core/utils/CaVector.h +++ b/algo/ca/core/utils/CaVector.h @@ -133,6 +133,7 @@ namespace cbm::algo::ca template<typename... Tinput> void enlarge(std::size_t count, Tinput... value) { +#ifndef FAST_CODE if (count < Tbase::size()) { LOG(fatal) << "ca::Vector \"" << fName << "\"::enlarge(" << count << "): the new size is smaller than the current one " << Tbase::size() << ", something goes wrong."; @@ -143,6 +144,7 @@ namespace cbm::algo::ca << Tbase::capacity() << " is reached, the vector of size " << Tbase::size() << " will be copied to the new place."; } +#endif Tbase::resize(count, value...); } @@ -150,11 +152,13 @@ namespace cbm::algo::ca /// \param count Size of the new vector void reduce(std::size_t count) { +#ifndef FAST_CODE if (count > Tbase::size()) { LOG(fatal) << "ca::Vector \"" << fName << "\"::reduce(" << count << "): the new size is bigger than the current one " << Tbase::size() << ", something goes wrong."; assert(count < Tbase::size()); } +#endif Tbase::resize(count); } @@ -162,11 +166,13 @@ namespace cbm::algo::ca /// \param count New size of the vector void reserve(std::size_t count) { +#ifndef FAST_CODE if (!Tbase::empty()) { LOG(fatal) << "ca::Vector \"" << fName << "\"::reserve(" << count << "): the vector is not empty; " << " it will be copied to the new place."; assert(Tbase::empty()); } +#endif Tbase::reserve(count); } -- GitLab