@@ -170,7 +170,7 @@ static inline bool _initFile(const std::string &_filename,
170170 return false ;
171171 }
172172
173- return initDoc (_sdf, _errors , &xmlDoc, _config);
173+ return initDoc (_errors, _sdf , &xmlDoc, _config);
174174}
175175
176176// ////////////////////////////////////////////////
@@ -394,29 +394,23 @@ bool init(SDFPtr _sdf)
394394 return init (_sdf, ParserConfig::GlobalConfig ());
395395}
396396
397- // ////////////////////////////////////////////////
398- bool init (sdf::Errors &_errors, SDFPtr _sdf)
399- {
400- return init (_sdf, _errors, ParserConfig::GlobalConfig ());
401- }
402-
403397// ////////////////////////////////////////////////
404398bool init (SDFPtr _sdf, const ParserConfig &_config)
405399{
406400 sdf::Errors errors;
407- bool result = init (_sdf, errors , _config);
401+ bool result = init (errors, _sdf , _config);
408402 sdf::throwOrPrintErrors (errors);
409403 return result;
410404
411405}
412406
413407// ////////////////////////////////////////////////
414- bool init (SDFPtr _sdf, sdf::Errors &_errors, const ParserConfig &_config)
408+ bool init (sdf::Errors &_errors, SDFPtr _sdf , const ParserConfig &_config)
415409{
416410 std::string xmldata = SDF::EmbeddedSpec (" root.sdf" , false );
417411 auto xmlDoc = makeSdfDoc ();
418412 xmlDoc.Parse (xmldata.c_str ());
419- return initDoc (_sdf, _errors , &xmlDoc, _config);
413+ return initDoc (_errors, _sdf , &xmlDoc, _config);
420414}
421415
422416// ////////////////////////////////////////////////
@@ -444,7 +438,7 @@ bool initFile(const std::string &_filename, const ParserConfig &_config,
444438 {
445439 auto xmlDoc = makeSdfDoc ();
446440 xmlDoc.Parse (xmldata.c_str ());
447- return initDoc (_sdf, _errors , &xmlDoc, _config);
441+ return initDoc (_errors, _sdf , &xmlDoc, _config);
448442 }
449443 return _initFile (sdf::findFile (_filename, true , false , _config), _config,
450444 _sdf, _errors);
@@ -475,7 +469,7 @@ bool initFile(const std::string &_filename, const ParserConfig &_config,
475469 {
476470 auto xmlDoc = makeSdfDoc ();
477471 xmlDoc.Parse (xmldata.c_str ());
478- return initDoc (_sdf, _errors , &xmlDoc, _config);
472+ return initDoc (_errors, _sdf , &xmlDoc, _config);
479473 }
480474 return _initFile (sdf::findFile (_filename, true , false , _config), _config,
481475 _sdf, _errors);
@@ -503,7 +497,7 @@ bool initString(const std::string &_xmlString, const ParserConfig &_config,
503497 return false ;
504498 }
505499
506- return initDoc (_sdf, _errors , &xmlDoc, _config);
500+ return initDoc (_errors, _sdf , &xmlDoc, _config);
507501}
508502
509503// ////////////////////////////////////////////////
@@ -538,8 +532,8 @@ inline tinyxml2::XMLElement *_initDocGetElement(tinyxml2::XMLDocument *_xmlDoc,
538532}
539533
540534// ////////////////////////////////////////////////
541- bool initDoc (SDFPtr _sdf ,
542- sdf::Errors &_errors ,
535+ bool initDoc (sdf::Errors &_errors ,
536+ SDFPtr _sdf ,
543537 tinyxml2::XMLDocument *_xmlDoc,
544538 const ParserConfig &_config)
545539{
@@ -549,12 +543,12 @@ bool initDoc(SDFPtr _sdf,
549543 return false ;
550544 }
551545
552- return initXml (_sdf->Root (), _errors , element, _config);
546+ return initXml (_errors, _sdf->Root (), element, _config);
553547}
554548
555549// ////////////////////////////////////////////////
556- bool initDoc (ElementPtr _sdf ,
557- sdf::Errors &_errors ,
550+ bool initDoc (sdf::Errors &_errors ,
551+ ElementPtr _sdf ,
558552 tinyxml2::XMLDocument *_xmlDoc,
559553 const ParserConfig &_config)
560554{
@@ -564,12 +558,12 @@ bool initDoc(ElementPtr _sdf,
564558 return false ;
565559 }
566560
567- return initXml (_sdf, _errors , element, _config);
561+ return initXml (_errors, _sdf , element, _config);
568562}
569563
570564// ////////////////////////////////////////////////
571- bool initXml (ElementPtr _sdf ,
572- sdf::Errors &_errors ,
565+ bool initXml (sdf::Errors &_errors ,
566+ ElementPtr _sdf ,
573567 tinyxml2::XMLElement *_xml,
574568 const ParserConfig &_config)
575569{
@@ -696,7 +690,7 @@ bool initXml(ElementPtr _sdf,
696690 else
697691 {
698692 ElementPtr element (new Element);
699- initXml (element, _errors , child, _config);
693+ initXml (_errors, element , child, _config);
700694 _sdf->AddElementDescription (element);
701695 }
702696 }
0 commit comments