From 243f1ab9a7f95961deb7577a2f8fdd1f7a20a6c2 Mon Sep 17 00:00:00 2001 From: Riccardo Maria Bianchi <riccardo.maria.bianchi@cern.ch> Date: Thu, 28 May 2020 12:39:21 +0200 Subject: [PATCH] Fix GCC error about vector iterator (not seen with Clang). Should fixes the CI --- GeoModelRead/src/ReadGeoModel.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/GeoModelRead/src/ReadGeoModel.cpp b/GeoModelRead/src/ReadGeoModel.cpp index 1423ba3..47c8868 100644 --- a/GeoModelRead/src/ReadGeoModel.cpp +++ b/GeoModelRead/src/ReadGeoModel.cpp @@ -543,10 +543,11 @@ void ReadGeoModel::loopOverAllChildrenInBunches() const unsigned int stop = start + len; std::vector<std::vector<std::string>>::const_iterator first = m_allchildren.begin() + start; std::vector<std::vector<std::string>>::const_iterator last = m_allchildren.begin() + stop; + std::vector<std::vector<std::string>>::const_iterator end = m_allchildren.end(); if ( bb == (nThreads - 1) ) { // last bunch - bunch = std::vector<std::vector<std::string>>(first, m_allchildren.end()); -// bunch = bunchIn; - } else { // all bunches but last one + bunch = std::vector<std::vector<std::string>>(first, end); + } + else { // all bunches but last one bunch = std::vector<std::vector<std::string>>(first, last); } -- GitLab