summaryrefslogtreecommitdiff
path: root/modules/fbx/fbx_parser/FBXDocumentUtil.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/fbx/fbx_parser/FBXDocumentUtil.cpp')
-rw-r--r--modules/fbx/fbx_parser/FBXDocumentUtil.cpp39
1 files changed, 4 insertions, 35 deletions
diff --git a/modules/fbx/fbx_parser/FBXDocumentUtil.cpp b/modules/fbx/fbx_parser/FBXDocumentUtil.cpp
index 835b66ab23..4a33024969 100644
--- a/modules/fbx/fbx_parser/FBXDocumentUtil.cpp
+++ b/modules/fbx/fbx_parser/FBXDocumentUtil.cpp
@@ -95,14 +95,14 @@ void DOMError(const std::string &message, const std::shared_ptr<Token> token) {
print_error("[FBX-DOM]" + String(message.c_str()) + ";" + String(token->StringContents().c_str()));
}
-void DOMError(const std::string &message, const Element *element /*= NULL*/) {
+void DOMError(const std::string &message, const Element *element /*= nullptr*/) {
if (element) {
DOMError(message, element->KeyToken());
}
print_error("[FBX-DOM] " + String(message.c_str()));
}
-void DOMError(const std::string &message, const std::shared_ptr<Element> element /*= NULL*/) {
+void DOMError(const std::string &message, const std::shared_ptr<Element> element /*= nullptr*/) {
if (element) {
DOMError(message, element->KeyToken());
}
@@ -117,7 +117,7 @@ void DOMWarning(const std::string &message, const Token *token) {
print_verbose("[FBX-DOM] warning:" + String(message.c_str()) + ";" + String(token->StringContents().c_str()));
}
-void DOMWarning(const std::string &message, const Element *element /*= NULL*/) {
+void DOMWarning(const std::string &message, const Element *element /*= nullptr*/) {
if (element) {
DOMWarning(message, element->KeyToken());
return;
@@ -129,7 +129,7 @@ void DOMWarning(const std::string &message, const std::shared_ptr<Token> token)
print_verbose("[FBX-DOM] warning:" + String(message.c_str()) + ";" + String(token->StringContents().c_str()));
}
-void DOMWarning(const std::string &message, const std::shared_ptr<Element> element /*= NULL*/) {
+void DOMWarning(const std::string &message, const std::shared_ptr<Element> element /*= nullptr*/) {
if (element) {
DOMWarning(message, element->KeyToken());
return;
@@ -137,36 +137,5 @@ void DOMWarning(const std::string &message, const std::shared_ptr<Element> eleme
print_verbose("[FBX-DOM] warning:" + String(message.c_str()));
}
-// ------------------------------------------------------------------------------------------------
-// fetch a property table and the corresponding property template
-const PropertyTable *GetPropertyTable(const Document &doc,
- const std::string &templateName,
- const ElementPtr element,
- const ScopePtr sc,
- bool no_warn /*= false*/) {
- // todo: make this an abstraction
- const ElementPtr Properties70 = sc->GetElement("Properties70");
- const PropertyTable *templateProps = static_cast<const PropertyTable *>(nullptr);
-
- if (templateName.length()) {
- PropertyTemplateMap::const_iterator it = doc.Templates().find(templateName);
- if (it != doc.Templates().end()) {
- templateProps = (*it).second;
- }
- }
-
- if (!Properties70 || !Properties70->Compound()) {
- if (!no_warn) {
- DOMWarning("property table (Properties70) not found", element);
- }
- if (templateProps) {
- return templateProps;
- } else {
- return new const PropertyTable();
- }
- }
-
- return new PropertyTable(Properties70, templateProps);
-}
} // namespace Util
} // namespace FBXDocParser