@@ -105,9 +105,9 @@ struct XMLParser::PImpl
105
105
void getPortsRecursively (const XMLElement* element,
106
106
std::vector<std::string>& output_ports);
107
107
108
- void loadDocImpl (tinyxml2:: XMLDocument* doc, bool add_includes);
108
+ void loadDocImpl (XMLDocument* doc, bool add_includes);
109
109
110
- std::list<std::unique_ptr<tinyxml2:: XMLDocument> > opened_documents;
110
+ std::list<std::unique_ptr<XMLDocument> > opened_documents;
111
111
std::map<std::string, const XMLElement*> tree_roots;
112
112
113
113
const BehaviorTreeFactory& factory;
@@ -156,9 +156,9 @@ XMLParser::~XMLParser()
156
156
157
157
void XMLParser::loadFromFile (const std::filesystem::path& filepath, bool add_includes)
158
158
{
159
- _p->opened_documents .emplace_back (new tinyxml2:: XMLDocument ());
159
+ _p->opened_documents .emplace_back (new XMLDocument ());
160
160
161
- tinyxml2:: XMLDocument* doc = _p->opened_documents .back ().get ();
161
+ XMLDocument* doc = _p->opened_documents .back ().get ();
162
162
doc->LoadFile (filepath.string ().c_str ());
163
163
164
164
_p->current_path = std::filesystem::absolute (filepath.parent_path ());
@@ -168,9 +168,9 @@ void XMLParser::loadFromFile(const std::filesystem::path& filepath, bool add_inc
168
168
169
169
void XMLParser::loadFromText (const std::string& xml_text, bool add_includes)
170
170
{
171
- _p->opened_documents .emplace_back (new tinyxml2:: XMLDocument ());
171
+ _p->opened_documents .emplace_back (new XMLDocument ());
172
172
173
- tinyxml2:: XMLDocument* doc = _p->opened_documents .back ().get ();
173
+ XMLDocument* doc = _p->opened_documents .back ().get ();
174
174
doc->Parse (xml_text.c_str (), xml_text.size ());
175
175
176
176
_p->loadDocImpl (doc, add_includes);
@@ -231,7 +231,7 @@ void BT::XMLParser::PImpl::loadSubtreeModel(const XMLElement* xml_root)
231
231
}
232
232
}
233
233
234
- void XMLParser::PImpl::loadDocImpl (tinyxml2:: XMLDocument* doc, bool add_includes)
234
+ void XMLParser::PImpl::loadDocImpl (XMLDocument* doc, bool add_includes)
235
235
{
236
236
if (doc->Error ())
237
237
{
@@ -290,8 +290,8 @@ void XMLParser::PImpl::loadDocImpl(tinyxml2::XMLDocument* doc, bool add_includes
290
290
file_path = current_path / file_path;
291
291
}
292
292
293
- opened_documents.emplace_back (new tinyxml2:: XMLDocument ());
294
- tinyxml2:: XMLDocument* next_doc = opened_documents.back ().get ();
293
+ opened_documents.emplace_back (new XMLDocument ());
294
+ XMLDocument* next_doc = opened_documents.back ().get ();
295
295
296
296
// change current path to the included file for handling additional relative paths
297
297
const auto previous_path = current_path;
@@ -341,7 +341,7 @@ void XMLParser::PImpl::loadDocImpl(tinyxml2::XMLDocument* doc, bool add_includes
341
341
void VerifyXML (const std::string& xml_text,
342
342
const std::unordered_map<std::string, BT::NodeType>& registered_nodes)
343
343
{
344
- tinyxml2:: XMLDocument doc;
344
+ XMLDocument doc;
345
345
auto xml_error = doc.Parse (xml_text.c_str (), xml_text.size ());
346
346
if (xml_error)
347
347
{
0 commit comments