From ae672bbfc703f13848aba39f6fdca8a54a6e7b84 Mon Sep 17 00:00:00 2001 From: Manish Date: Mon, 18 Mar 2019 12:51:27 +0100 Subject: [PATCH] small refactor --- LibCarla/source/carla/opendrive/parser/LaneParser.cpp | 8 ++++---- LibCarla/source/carla/opendrive/parser/LaneParser.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/LibCarla/source/carla/opendrive/parser/LaneParser.cpp b/LibCarla/source/carla/opendrive/parser/LaneParser.cpp index 3d03e1406..ed245364f 100644 --- a/LibCarla/source/carla/opendrive/parser/LaneParser.cpp +++ b/LibCarla/source/carla/opendrive/parser/LaneParser.cpp @@ -15,13 +15,13 @@ namespace opendrive { namespace parser { void LaneParser::ParseLanes( - int32_t road_id, + RoadId road_id, int32_t lane_section_id, const pugi::xml_node &parent_node, carla::road::MapBuilder &map_builder) { for (pugi::xml_node lane_node : parent_node.children("lane")) { - int32_t lane_id = lane_node.attribute("id").as_int(); + LaneId lane_id = lane_node.attribute("id").as_int(); // Lane Width for (pugi::xml_node lane_width_node : lane_node.children("width")) { @@ -185,14 +185,14 @@ namespace parser { // Lanes for (pugi::xml_node road_node : open_drive_node.children("road")) { - int32_t road_id = road_node.attribute("id").as_uint(); + RoadId road_id = road_node.attribute("id").as_uint(); for (pugi::xml_node lanes_node : road_node.children("lanes")) { int32_t lane_section_id = 0; for (pugi::xml_node lane_section_node : lanes_node.children("laneSection")) { pugi::xml_node left_node = lane_section_node.child("left"); - if (left_node != nullptr) { + if (left_node) { ParseLanes(road_id, lane_section_id, left_node, map_builder); } diff --git a/LibCarla/source/carla/opendrive/parser/LaneParser.h b/LibCarla/source/carla/opendrive/parser/LaneParser.h index 09d979001..0f75ed74d 100644 --- a/LibCarla/source/carla/opendrive/parser/LaneParser.h +++ b/LibCarla/source/carla/opendrive/parser/LaneParser.h @@ -24,7 +24,7 @@ namespace parser { private: static void ParseLanes( - int road_id, + RoadId road_id, int lane_section_id, const pugi::xml_node &parent_node, carla::road::MapBuilder &map_builder);