From 88a425b1c15773e77a93092fe9469d151834f16b Mon Sep 17 00:00:00 2001 From: Riccardo Maria Bianchi <riccardo.maria.bianchi@cern.ch> Date: Fri, 24 May 2024 02:56:37 +0200 Subject: [PATCH] Fix store of built boolean shapes --- GeoModelIO/GeoModelRead/src/ReadGeoModel.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/GeoModelIO/GeoModelRead/src/ReadGeoModel.cpp b/GeoModelIO/GeoModelRead/src/ReadGeoModel.cpp index 340f8606b..806b8bf34 100644 --- a/GeoModelIO/GeoModelRead/src/ReadGeoModel.cpp +++ b/GeoModelIO/GeoModelRead/src/ReadGeoModel.cpp @@ -2861,15 +2861,13 @@ void ReadGeoModel::createBooleanShapeOperands(boolean_shapes_operands_info* shap // std::cout << "tuple: "; printTuple(tuple); // debug // Initializing variables for unpacking - - std::string shapeType; // std::get<2>(tuple); - unsigned shapeID{0}; // std::get<0>(tuple); - GeoShape* boolShPtr{nullptr}; // std::get<1>(tuple); - std::string typeA; // std::get<2>(tuple); - unsigned idA{0}; // std::get<3>(tuple); - std::string typeB; // std::get<4>(tuple); - unsigned idB{0}; // std::get<5>(tuple); - + std::string shapeType; + unsigned shapeID{0}; + GeoShape* boolShPtr{nullptr}; + std::string typeA; + unsigned idA{0}; + std::string typeB; + unsigned idB{0}; // use 'tie' to unpack the tuple values into separate variables std::tie(shapeType, shapeID, boolShPtr, typeA, idA, typeB, idB) = tuple; @@ -2953,7 +2951,7 @@ void ReadGeoModel::createBooleanShapeOperands(boolean_shapes_operands_info* shap THROW_EXCEPTION("ERROR! Undefined operator shape! This part of the code should not be reached!"); } // then, store the now completed shape and continue to the next item - storeBuiltShape(shapeID, boolShPtr); + storeBuiltShape(shapeType, shapeID, boolShPtr); } } -- GitLab