Skip to content

Commit bbedc40

Browse files
committed
feature: re-add OpenDriveMap::xml_doc holding the xml tree data
1 parent a1f3477 commit bbedc40

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

include/OpenDriveMap.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ class OpenDriveMap
4242
double y_offs = 0;
4343
std::string xodr_file = "";
4444

45+
pugi::xml_document xml_doc; // only movable, owns tree data
46+
4547
std::map<std::string, Road> id_to_road;
4648
std::map<std::string, Junction> id_to_junction;
4749
};

src/OpenDriveMap.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ OpenDriveMap::OpenDriveMap(const std::string& xodr_file,
4646
const bool with_road_signals) :
4747
xodr_file(xodr_file)
4848
{
49-
pugi::xml_document xml_doc;
50-
const pugi::xml_parse_result xml_parse_result = xml_doc.load_file(xodr_file.c_str());
49+
const pugi::xml_parse_result xml_parse_result = this->xml_doc.load_file(xodr_file.c_str());
5150
if (!xml_parse_result)
5251
log::error("Error parsing xml: {}", xml_parse_result.description());
5352

0 commit comments

Comments
 (0)