@@ -817,7 +817,7 @@ bool readFileInternal(const std::string &_filename, const bool _convert,
817817
818818 if (filesystem::is_directory (filename))
819819 {
820- filename = getModelFilePath (filename, _errors );
820+ filename = getModelFilePath (_errors, filename );
821821 }
822822
823823 if (!filesystem::exists (filename))
@@ -1095,7 +1095,7 @@ bool readDoc(tinyxml2::XMLDocument *_xmlDoc, SDFPtr _sdf,
10951095 // delimiter '::' in element names not allowed in SDFormat >= 1.8
10961096 gz::math::SemanticVersion sdfVersion (_sdf->Root ()->OriginalVersion ());
10971097 if (sdfVersion >= gz::math::SemanticVersion (1 , 8 )
1098- && !recursiveSiblingNoDoubleColonInNames (_sdf->Root (), _errors ))
1098+ && !recursiveSiblingNoDoubleColonInNames (_errors, _sdf->Root ()))
10991099 {
11001100 _errors.push_back ({ErrorCode::RESERVED_NAME,
11011101 " Delimiter '::' found in attribute names of element <"
@@ -1189,7 +1189,7 @@ bool readDoc(tinyxml2::XMLDocument *_xmlDoc, ElementPtr _sdf,
11891189 // delimiter '::' in element names not allowed in SDFormat >= 1.8
11901190 gz::math::SemanticVersion sdfVersion (_sdf->OriginalVersion ());
11911191 if (sdfVersion >= gz::math::SemanticVersion (1 , 8 )
1192- && !recursiveSiblingNoDoubleColonInNames (_sdf, _errors ))
1192+ && !recursiveSiblingNoDoubleColonInNames (_errors, _sdf ))
11931193 {
11941194 _errors.push_back ({ErrorCode::RESERVED_NAME,
11951195 " Delimiter '::' found in attribute names of element <" +
@@ -1325,14 +1325,14 @@ std::string getBestSupportedModelVersion(tinyxml2::XMLElement *_modelXML,
13251325std::string getModelFilePath (const std::string &_modelDirPath)
13261326{
13271327 sdf::Errors errors;
1328- std::string result = getModelFilePath (_modelDirPath, errors );
1328+ std::string result = getModelFilePath (errors, _modelDirPath );
13291329 sdf::throwOrPrintErrors (errors);
13301330 return result;
13311331}
13321332
13331333// ////////////////////////////////////////////////
1334- std::string getModelFilePath (const std::string &_modelDirPath ,
1335- sdf::Errors &_errors )
1334+ std::string getModelFilePath (sdf::Errors &_errors ,
1335+ const std::string &_modelDirPath )
13361336{
13371337 std::string configFilePath;
13381338
@@ -1546,7 +1546,7 @@ static bool resolveFileNameFromUri(tinyxml2::XMLElement *_includeXml,
15461546 if (sdf::filesystem::is_directory (modelPath))
15471547 {
15481548 // Get the model.config filename
1549- _fileName = getModelFilePath (modelPath);
1549+ _fileName = getModelFilePath (_errors, modelPath);
15501550
15511551 if (_fileName.empty ())
15521552 {
@@ -2222,17 +2222,17 @@ sdf::Errors convertString(SDFPtr _sdf, const std::string &_sdfString,
22222222bool checkCanonicalLinkNames (const sdf::Root *_root)
22232223{
22242224 sdf::Errors errors;
2225- bool result = checkCanonicalLinkNames (_root, errors );
2225+ bool result = checkCanonicalLinkNames (errors, _root );
22262226 sdf::throwOrPrintErrors (errors);
22272227 return result;
22282228}
22292229
22302230// ////////////////////////////////////////////////
2231- bool checkCanonicalLinkNames (const sdf::Root *_root, sdf::Errors &_errors )
2231+ bool checkCanonicalLinkNames (sdf::Errors &_errors, const sdf::Root *_root )
22322232{
22332233 if (!_root)
22342234 {
2235- _errors.push_back ({ErrorCode::POINTER_ERROR , " Error: invalid sdf::Root "
2235+ _errors.push_back ({ErrorCode::FATAL_ERROR , " Error: invalid sdf::Root "
22362236 " pointer, unable to check canonical link names." });
22372237 return false ;
22382238 }
@@ -2277,13 +2277,13 @@ bool checkCanonicalLinkNames(const sdf::Root *_root, sdf::Errors &_errors)
22772277bool checkFrameAttachedToNames (const sdf::Root *_root)
22782278{
22792279 sdf::Errors errors;
2280- bool result = checkFrameAttachedToNames (_root, errors );
2280+ bool result = checkFrameAttachedToNames (errors, _root );
22812281 sdf::throwOrPrintErrors (errors);
22822282 return result;
22832283}
22842284
22852285// ////////////////////////////////////////////////
2286- bool checkFrameAttachedToNames (const sdf::Root *_root, sdf::Errors &_errors )
2286+ bool checkFrameAttachedToNames (sdf::Errors &_errors, const sdf::Root *_root )
22872287{
22882288 bool result = true ;
22892289
@@ -2420,13 +2420,13 @@ bool checkFrameAttachedToNames(const sdf::Root *_root, sdf::Errors &_errors)
24202420bool recursiveSameTypeUniqueNames (sdf::ElementPtr _elem)
24212421{
24222422 sdf::Errors errors;
2423- bool result = recursiveSameTypeUniqueNames (_elem, errors );
2423+ bool result = recursiveSameTypeUniqueNames (errors, _elem );
24242424 sdf::throwOrPrintErrors (errors);
24252425 return result;
24262426}
24272427
24282428// ////////////////////////////////////////////////
2429- bool recursiveSameTypeUniqueNames (sdf::ElementPtr _elem , sdf::Errors &_errors )
2429+ bool recursiveSameTypeUniqueNames (sdf::Errors &_errors , sdf::ElementPtr _elem )
24302430{
24312431 if (!shouldValidateElement (_elem))
24322432 return true ;
@@ -2447,7 +2447,7 @@ bool recursiveSameTypeUniqueNames(sdf::ElementPtr _elem, sdf::Errors &_errors)
24472447 sdf::ElementPtr child = _elem->GetFirstElement ();
24482448 while (child)
24492449 {
2450- result = recursiveSameTypeUniqueNames (child, _errors ) && result;
2450+ result = recursiveSameTypeUniqueNames (_errors, child ) && result;
24512451 child = child->GetNextElement ();
24522452 }
24532453
@@ -2458,13 +2458,13 @@ bool recursiveSameTypeUniqueNames(sdf::ElementPtr _elem, sdf::Errors &_errors)
24582458bool recursiveSiblingUniqueNames (sdf::ElementPtr _elem)
24592459{
24602460 sdf::Errors errors;
2461- bool result = recursiveSiblingUniqueNames (_elem, errors );
2461+ bool result = recursiveSiblingUniqueNames (errors, _elem );
24622462 sdf::throwOrPrintErrors (errors);
24632463 return result;
24642464}
24652465
24662466// ////////////////////////////////////////////////
2467- bool recursiveSiblingUniqueNames (sdf::ElementPtr _elem , sdf::Errors &_errors )
2467+ bool recursiveSiblingUniqueNames (sdf::Errors &_errors , sdf::ElementPtr _elem )
24682468{
24692469 if (!shouldValidateElement (_elem))
24702470 return true ;
@@ -2482,7 +2482,7 @@ bool recursiveSiblingUniqueNames(sdf::ElementPtr _elem, sdf::Errors &_errors)
24822482 sdf::ElementPtr child = _elem->GetFirstElement ();
24832483 while (child)
24842484 {
2485- result = recursiveSiblingUniqueNames (child) && result;
2485+ result = recursiveSiblingUniqueNames (_errors, child) && result;
24862486 child = child->GetNextElement ();
24872487 }
24882488
@@ -2493,14 +2493,14 @@ bool recursiveSiblingUniqueNames(sdf::ElementPtr _elem, sdf::Errors &_errors)
24932493bool recursiveSiblingNoDoubleColonInNames (sdf::ElementPtr _elem)
24942494{
24952495 sdf::Errors errors;
2496- bool result = recursiveSiblingNoDoubleColonInNames (_elem, errors );
2496+ bool result = recursiveSiblingNoDoubleColonInNames (errors, _elem );
24972497 sdf::throwOrPrintErrors (errors);
24982498 return result;
24992499}
25002500
25012501// ////////////////////////////////////////////////
2502- bool recursiveSiblingNoDoubleColonInNames (sdf::ElementPtr _elem ,
2503- sdf::Errors &_errors )
2502+ bool recursiveSiblingNoDoubleColonInNames (sdf::Errors &_errors ,
2503+ sdf::ElementPtr _elem )
25042504{
25052505 if (!shouldValidateElement (_elem))
25062506 return true ;
@@ -2518,7 +2518,7 @@ bool recursiveSiblingNoDoubleColonInNames(sdf::ElementPtr _elem,
25182518 sdf::ElementPtr child = _elem->GetFirstElement ();
25192519 while (child)
25202520 {
2521- result = recursiveSiblingNoDoubleColonInNames (child, _errors ) && result;
2521+ result = recursiveSiblingNoDoubleColonInNames (_errors, child ) && result;
25222522 child = child->GetNextElement ();
25232523 }
25242524
@@ -2529,13 +2529,13 @@ bool recursiveSiblingNoDoubleColonInNames(sdf::ElementPtr _elem,
25292529bool checkFrameAttachedToGraph (const sdf::Root *_root)
25302530{
25312531 sdf::Errors errors;
2532- bool result = checkFrameAttachedToGraph (_root, errors );
2532+ bool result = checkFrameAttachedToGraph (errors, _root );
25332533 sdf::throwOrPrintErrors (errors);
25342534 return result;
25352535}
25362536
25372537// ////////////////////////////////////////////////
2538- bool checkFrameAttachedToGraph (const sdf::Root *_root, sdf::Errors &_errors )
2538+ bool checkFrameAttachedToGraph (sdf::Errors &_errors, const sdf::Root *_root )
25392539{
25402540 bool result = true ;
25412541
@@ -2622,13 +2622,13 @@ bool checkFrameAttachedToGraph(const sdf::Root *_root, sdf::Errors &_errors)
26222622bool checkPoseRelativeToGraph (const sdf::Root *_root)
26232623{
26242624 sdf::Errors errors;
2625- bool result = checkPoseRelativeToGraph (_root, errors );
2625+ bool result = checkPoseRelativeToGraph (errors, _root );
26262626 sdf::throwOrPrintErrors (errors);
26272627 return result;
26282628}
26292629
26302630// ////////////////////////////////////////////////
2631- bool checkPoseRelativeToGraph (const sdf::Root *_root, sdf::Errors &_errors )
2631+ bool checkPoseRelativeToGraph (sdf::Errors &_errors, const sdf::Root *_root )
26322632{
26332633 bool result = true ;
26342634
0 commit comments