From 9f701378744b78d902e5dc28f06b707c89305a99 Mon Sep 17 00:00:00 2001 From: Pablo Alvarez Lopez Date: Thu, 9 Jan 2025 11:03:13 +0100 Subject: [PATCH] Revert "fixed error loading values triggered='0' and parking='0'. Refs #457" This reverts commit 9c8ee3743fb34e2ce8ce78b1e11f6592e3cba864. --- src/utils/handlers/RouteHandler.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/utils/handlers/RouteHandler.cpp b/src/utils/handlers/RouteHandler.cpp index cb03f0de4f5..85089803fa7 100644 --- a/src/utils/handlers/RouteHandler.cpp +++ b/src/utils/handlers/RouteHandler.cpp @@ -994,9 +994,6 @@ RouteHandler::parseNestedCFM(const SumoXMLTag tag, const SUMOSAXAttributes& attr bool RouteHandler::parseStopParameters(SUMOVehicleParameter::Stop& stop, const SUMOSAXAttributes& attrs) { - const auto falseStr = toString(false); - // get parameters - bool ok = true; // check stop parameters if (attrs.hasAttribute(SUMO_ATTR_ARRIVAL)) { stop.parametersSet |= STOP_ARRIVAL_SET; @@ -1025,14 +1022,14 @@ RouteHandler::parseStopParameters(SUMOVehicleParameter::Stop& stop, const SUMOSA if (attrs.hasAttribute(SUMO_ATTR_POSITION_LAT)) { stop.parametersSet |= STOP_POSLAT_SET; } - if (attrs.hasAttribute(SUMO_ATTR_TRIGGERED) && (attrs.getOpt(SUMO_ATTR_TRIGGERED, nullptr, ok, falseStr) != falseStr)) { + if (attrs.hasAttribute(SUMO_ATTR_TRIGGERED)) { stop.parametersSet |= STOP_TRIGGER_SET; } // legacy attribute - if (attrs.hasAttribute(SUMO_ATTR_CONTAINER_TRIGGERED) && (attrs.getOpt(SUMO_ATTR_CONTAINER_TRIGGERED, nullptr, ok, falseStr) != falseStr)) { + if (attrs.hasAttribute(SUMO_ATTR_CONTAINER_TRIGGERED)) { stop.parametersSet |= STOP_TRIGGER_SET; } - if (attrs.hasAttribute(SUMO_ATTR_PARKING) && (attrs.getOpt(SUMO_ATTR_PARKING, nullptr, ok, falseStr) != falseStr)) { + if (attrs.hasAttribute(SUMO_ATTR_PARKING)) { stop.parametersSet |= STOP_PARKING_SET; } if (attrs.hasAttribute(SUMO_ATTR_EXPECTED)) { @@ -1065,6 +1062,8 @@ RouteHandler::parseStopParameters(SUMOVehicleParameter::Stop& stop, const SUMOSA if (attrs.hasAttribute(SUMO_ATTR_JUMP)) { stop.parametersSet |= STOP_JUMP_SET; } + // get parameters + bool ok = true; // edge/lane stop.edge = attrs.getOpt(SUMO_ATTR_EDGE, nullptr, ok, ""); stop.lane = attrs.getOpt(SUMO_ATTR_LANE, nullptr, ok, stop.busstop);