From 358819c1a021a87aa71daa9035b8c60dcf3a68d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Terziman?= Date: Thu, 20 Mar 2014 15:32:12 +0100 Subject: [PATCH] Fixed error in GetProperty when accessed from external libraries using a different language (using swig for example) --- code/Importer.cpp | 4 ++-- include/assimp/Importer.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/Importer.cpp b/code/Importer.cpp index 1ad2ea498..c6b9daf67 100644 --- a/code/Importer.cpp +++ b/code/Importer.cpp @@ -966,7 +966,7 @@ float Importer::GetPropertyFloat(const char* szName, // ------------------------------------------------------------------------------------------------ // Get a configuration property -const std::string& Importer::GetPropertyString(const char* szName, +const std::string Importer::GetPropertyString(const char* szName, const std::string& iErrorReturn /*= ""*/) const { return GetGenericProperty(pimpl->mStringProperties,szName,iErrorReturn); @@ -974,7 +974,7 @@ const std::string& Importer::GetPropertyString(const char* szName, // ------------------------------------------------------------------------------------------------ // Get a configuration property -const aiMatrix4x4& Importer::GetPropertyMatrix(const char* szName, +const aiMatrix4x4 Importer::GetPropertyMatrix(const char* szName, const aiMatrix4x4& iErrorReturn /*= aiMatrix4x4()*/) const { return GetGenericProperty(pimpl->mMatrixProperties,szName,iErrorReturn); diff --git a/include/assimp/Importer.hpp b/include/assimp/Importer.hpp index 4260300a7..5e7797b99 100644 --- a/include/assimp/Importer.hpp +++ b/include/assimp/Importer.hpp @@ -277,7 +277,7 @@ public: * The return value remains valid until the property is modified. * @see GetPropertyInteger() */ - const std::string& GetPropertyString(const char* szName, + const std::string GetPropertyString(const char* szName, const std::string& sErrorReturn = "") const; // ------------------------------------------------------------------- @@ -286,7 +286,7 @@ public: * The return value remains valid until the property is modified. * @see GetPropertyInteger() */ - const aiMatrix4x4& GetPropertyMatrix(const char* szName, + const aiMatrix4x4 GetPropertyMatrix(const char* szName, const aiMatrix4x4& sErrorReturn = aiMatrix4x4()) const; // -------------------------------------------------------------------