fixed returning a reference to a local variable

This commit is contained in:
luiscuenca 2017-10-10 12:44:38 -07:00
parent a7a1329c5f
commit 25b419a1a1
2 changed files with 4 additions and 4 deletions

View file

@ -660,7 +660,7 @@ bool GLTFReader::parseGLTF(const QByteArray& model) {
return true;
}
const glm::mat4& GLTFReader::getModelTransform(const GLTFNode& node) {
glm::mat4 GLTFReader::getModelTransform(const GLTFNode& node) {
glm::mat4 tmat = glm::mat4(1.0);
if (node.defined["matrix"] && node.matrix.size() == 16) {
@ -962,7 +962,7 @@ QNetworkReply* GLTFReader::request(QUrl& url, bool isTest) {
return netReply; // trying to sync later on.
}
const FBXTexture& GLTFReader::getFBXTexture(const GLTFTexture& texture) {
FBXTexture GLTFReader::getFBXTexture(const GLTFTexture& texture) {
FBXTexture fbxtex = FBXTexture();
fbxtex.texcoordSet = 0;

View file

@ -712,7 +712,7 @@ private:
GLTFFile _file;
QUrl _url;
const glm::mat4& getModelTransform(const GLTFNode& node);
glm::mat4 getModelTransform(const GLTFNode& node);
bool buildGeometry(FBXGeometry& geometry, const QUrl& url);
bool parseGLTF(const QByteArray& model);
@ -779,7 +779,7 @@ private:
void setFBXMaterial(FBXMaterial& fbxmat, const GLTFMaterial& material);
const FBXTexture& getFBXTexture(const GLTFTexture& texture);
FBXTexture getFBXTexture(const GLTFTexture& texture);
void fbxDebugDump(const FBXGeometry& fbxgeo);
};