Browse Source

Fixed error in GetProperty when accessed from external libraries using a different language (using swig for example)

Léo Terziman 11 years ago
parent
commit
358819c1a0
2 changed files with 4 additions and 4 deletions
  1. 2 2
      code/Importer.cpp
  2. 2 2
      include/assimp/Importer.hpp

+ 2 - 2
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<std::string>(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<aiMatrix4x4>(pimpl->mMatrixProperties,szName,iErrorReturn);

+ 2 - 2
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;
 
 	// -------------------------------------------------------------------