Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.2] Fix const warnings in FBX (build failure on macOS) #45351

Merged
merged 1 commit into from
Jan 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions modules/fbx/fbx_parser/FBXDocument.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class LazyObject {
return (flags & FAILED_TO_CONSTRUCT) != 0;
}

const ElementPtr GetElement() const {
ElementPtr GetElement() const {
return element;
}

Expand Down Expand Up @@ -136,7 +136,7 @@ class Object {

virtual ~Object();

const ElementPtr SourceElement() const {
ElementPtr SourceElement() const {
return element;
}

Expand Down
10 changes: 5 additions & 5 deletions modules/fbx/fbx_parser/FBXParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1186,8 +1186,8 @@ std::string ParseTokenAsString(const TokenPtr t) {

// ------------------------------------------------------------------------------------------------
// extract a required element from a scope, abort if the element cannot be found
const ElementPtr GetRequiredElement(const ScopePtr sc, const std::string &index, const ElementPtr element /*= NULL*/) {
const ElementPtr el = sc->GetElement(index);
ElementPtr GetRequiredElement(const ScopePtr sc, const std::string &index, const ElementPtr element /*= NULL*/) {
ElementPtr el = sc->GetElement(index);
TokenPtr token = el->KeyToken();
ERR_FAIL_COND_V(!token, nullptr);
if (!el) {
Expand All @@ -1207,14 +1207,14 @@ bool HasElement(const ScopePtr sc, const std::string &index) {

// ------------------------------------------------------------------------------------------------
// extract a required element from a scope, abort if the element cannot be found
const ElementPtr GetOptionalElement(const ScopePtr sc, const std::string &index, const ElementPtr element /*= NULL*/) {
const ElementPtr el = sc->GetElement(index);
ElementPtr GetOptionalElement(const ScopePtr sc, const std::string &index, const ElementPtr element /*= NULL*/) {
ElementPtr el = sc->GetElement(index);
return el;
}

// ------------------------------------------------------------------------------------------------
// extract required compound scope
const ScopePtr GetRequiredScope(const ElementPtr el) {
ScopePtr GetRequiredScope(const ElementPtr el) {
if (el) {
ScopePtr s = el->Compound();
TokenPtr token = el->KeyToken();
Expand Down
10 changes: 5 additions & 5 deletions modules/fbx/fbx_parser/FBXParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ class Parser {
Parser(const TokenList &tokens, bool is_binary);
~Parser();

const ScopePtr GetRootScope() const {
ScopePtr GetRootScope() const {
return root;
}

Expand Down Expand Up @@ -247,11 +247,11 @@ void ParseVectorDataArray(std::vector<int64_t> &out, const ElementPtr el);
bool HasElement(const ScopePtr sc, const std::string &index);

// extract a required element from a scope, abort if the element cannot be found
const ElementPtr GetRequiredElement(const ScopePtr sc, const std::string &index, const ElementPtr element = nullptr);
const ScopePtr GetRequiredScope(const ElementPtr el); // New in 2020. (less likely to destroy application)
const ElementPtr GetOptionalElement(const ScopePtr sc, const std::string &index, const ElementPtr element = nullptr);
ElementPtr GetRequiredElement(const ScopePtr sc, const std::string &index, const ElementPtr element = nullptr);
ScopePtr GetRequiredScope(const ElementPtr el); // New in 2020. (less likely to destroy application)
ElementPtr GetOptionalElement(const ScopePtr sc, const std::string &index, const ElementPtr element = nullptr);
// extract required compound scope
const ScopePtr GetRequiredScope(const ElementPtr el);
ScopePtr GetRequiredScope(const ElementPtr el);
// get token at a particular index
TokenPtr GetRequiredToken(const ElementPtr el, unsigned int index);

Expand Down
2 changes: 1 addition & 1 deletion modules/fbx/fbx_parser/FBXProperties.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class PropertyTable {
PropertyPtr Get(const std::string &name) const;

// PropertyTable's need not be coupled with FBX elements so this can be NULL
const ElementPtr GetElement() const {
ElementPtr GetElement() const {
return element;
}

Expand Down