Skip to content

Commit 583aafc

Browse files
committed
refactor: remove unused OpenDriveMap xml_doc and xml_parse_result members; was not copyable because of pugi::xml_document
1 parent 2336d7c commit 583aafc

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

include/OpenDriveMap.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,10 @@ class OpenDriveMap
3333
RoadNetworkMesh get_road_network_mesh(const double eps) const;
3434
RoutingGraph get_routing_graph() const;
3535

36-
std::string proj4 = "";
37-
double x_offs = 0;
38-
double y_offs = 0;
39-
const std::string xodr_file = "";
40-
pugi::xml_document xml_doc;
41-
pugi::xml_parse_result xml_parse_result;
36+
std::string proj4 = "";
37+
double x_offs = 0;
38+
double y_offs = 0;
39+
const std::string xodr_file = "";
4240

4341
std::map<std::string, Road> id_to_road;
4442
std::map<std::string, Junction> id_to_junction;

src/OpenDriveMap.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,12 @@ OpenDriveMap::OpenDriveMap(const std::string& xodr_file,
7474
const bool with_road_signals) :
7575
xodr_file(xodr_file)
7676
{
77-
this->xml_parse_result = this->xml_doc.load_file(xodr_file.c_str());
78-
if (!this->xml_parse_result)
79-
log::error("Error parsing xml: %s", this->xml_parse_result.description());
77+
pugi::xml_document xml_doc;
78+
const pugi::xml_parse_result xml_parse_result = xml_doc.load_file(xodr_file.c_str());
79+
if (!xml_parse_result)
80+
log::error("Error parsing xml: %s", xml_parse_result.description());
8081

81-
const pugi::xml_node odr_node = this->xml_doc.child("OpenDRIVE");
82+
const pugi::xml_node odr_node = xml_doc.child("OpenDRIVE");
8283

8384
if (const auto geoReference_node = odr_node.child("header").child("geoReference"))
8485
this->proj4 = geoReference_node.text().as_string("");

0 commit comments

Comments
 (0)