Refactor LLDAELoader

- Many instances of null-checking if statements include both variable declaration and initialization (for scoping)
- Modern(ish) C++ conventions (e.g. range-based for loops, auto keyword)
- Local variable caching for array/iterator elements
- const keyword for variables that should not be mutated (optimization possible)
- const keyword for instance methods that should not mutate (affects LLModelLoader in one case)
- Consistent usage of un/signed types for array indexing
- Better readability/simplicity of branching
- Consolidated extractTranslation/ViaElement logic (reusability)
- Formatting
- Changes based on code review
This commit is contained in:
Tarocco
2020-10-09 15:31:01 -07:00
committed by Liru Færs
parent c1aa88c720
commit d49c38bf18
3 changed files with 743 additions and 862 deletions

View File

@@ -180,7 +180,7 @@ public:
//-----------------------------------------------------------------------------
// isNodeAJoint()
//-----------------------------------------------------------------------------
bool isNodeAJoint(const char* name)
bool isNodeAJoint(const char* name) const
{
return name != NULL && mJointMap.find(name) != mJointMap.end();
}