Browse Source

# fic gcc compile error caused by a temporary beeing accidentially bound to a non-const reference

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1020 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
aramis_acg 14 years ago
parent
commit
a4e371af4b
1 changed files with 7 additions and 7 deletions
  1. 7 7
      code/STEPFile.h

+ 7 - 7
code/STEPFile.h

@@ -731,7 +731,7 @@ namespace STEP {
 	// ------------------------------------------------------------------------------
 	// ------------------------------------------------------------------------------
 	template <typename T>
 	template <typename T>
 	struct InternGenericConvert {
 	struct InternGenericConvert {
-		void operator()(T& out, boost::shared_ptr< const EXPRESS::DataType >& in, const STEP::DB& db) {
+		void operator()(T& out, const boost::shared_ptr< const EXPRESS::DataType >& in, const STEP::DB& db) {
 			try{
 			try{
 				out = dynamic_cast< const typename PickBaseType<T>::Type& > ( *in );
 				out = dynamic_cast< const typename PickBaseType<T>::Type& > ( *in );
 			}
 			}
@@ -743,14 +743,14 @@ namespace STEP {
 
 
 	template <>
 	template <>
 	struct InternGenericConvert< boost::shared_ptr< const EXPRESS::DataType > > {
 	struct InternGenericConvert< boost::shared_ptr< const EXPRESS::DataType > > {
-		void operator()(boost::shared_ptr< const EXPRESS::DataType >& out, boost::shared_ptr< const EXPRESS::DataType >& in, const STEP::DB& db) {
+		void operator()(boost::shared_ptr< const EXPRESS::DataType >& out, const boost::shared_ptr< const EXPRESS::DataType >& in, const STEP::DB& db) {
 			out = in;
 			out = in;
 		}
 		}
 	};
 	};
 
 
 	template <typename T>
 	template <typename T>
 	struct InternGenericConvert< Maybe<T> > {
 	struct InternGenericConvert< Maybe<T> > {
-		void operator()(Maybe<T>& out, boost::shared_ptr< const EXPRESS::DataType >& in, const STEP::DB& db) {
+		void operator()(Maybe<T>& out, const boost::shared_ptr< const EXPRESS::DataType >& in, const STEP::DB& db) {
 			GenericConvert((T&)out,in,db);
 			GenericConvert((T&)out,in,db);
 			out.flag_valid();
 			out.flag_valid();
 		}
 		}
@@ -758,7 +758,7 @@ namespace STEP {
 
 
 	template <typename T,uint64_t min_cnt, uint64_t max_cnt>
 	template <typename T,uint64_t min_cnt, uint64_t max_cnt>
 	struct InternGenericConvertList {
 	struct InternGenericConvertList {
-		void operator()(ListOf<T, min_cnt, max_cnt>& out, boost::shared_ptr< const EXPRESS::DataType >& inp_base, const STEP::DB& db) {
+		void operator()(ListOf<T, min_cnt, max_cnt>& out, const boost::shared_ptr< const EXPRESS::DataType >& inp_base, const STEP::DB& db) {
 
 
 			const EXPRESS::LIST* inp = dynamic_cast<const EXPRESS::LIST*>(inp_base.get());
 			const EXPRESS::LIST* inp = dynamic_cast<const EXPRESS::LIST*>(inp_base.get());
 			if (!inp) {
 			if (!inp) {
@@ -789,7 +789,7 @@ namespace STEP {
 
 
 	template <typename T>
 	template <typename T>
 	struct InternGenericConvert< Lazy<T> > {
 	struct InternGenericConvert< Lazy<T> > {
-		void operator()(Lazy<T>& out, boost::shared_ptr< const EXPRESS::DataType >& in_base, const STEP::DB& db) {
+		void operator()(Lazy<T>& out, const boost::shared_ptr< const EXPRESS::DataType >& in_base, const STEP::DB& db) {
 			const EXPRESS::ENTITY* in = dynamic_cast<const EXPRESS::ENTITY*>(in_base.get());
 			const EXPRESS::ENTITY* in = dynamic_cast<const EXPRESS::ENTITY*>(in_base.get());
 			if (!in) {
 			if (!in) {
 				throw TypeError("type error reading entity");
 				throw TypeError("type error reading entity");
@@ -799,12 +799,12 @@ namespace STEP {
 	};
 	};
 
 
 	template <typename T1>
 	template <typename T1>
-	inline void GenericConvert(T1& a, boost::shared_ptr< const EXPRESS::DataType >& b, const STEP::DB& db) {
+	inline void GenericConvert(T1& a, const boost::shared_ptr< const EXPRESS::DataType >& b, const STEP::DB& db) {
 		return InternGenericConvert<T1>()(a,b,db);
 		return InternGenericConvert<T1>()(a,b,db);
 	}
 	}
 
 
 	template <typename T1,uint64_t N1, uint64_t N2>
 	template <typename T1,uint64_t N1, uint64_t N2>
-	inline void GenericConvert(ListOf<T1,N1,N2>& a, boost::shared_ptr< const EXPRESS::DataType >& b, const STEP::DB& db) {
+	inline void GenericConvert(ListOf<T1,N1,N2>& a, const boost::shared_ptr< const EXPRESS::DataType >& b, const STEP::DB& db) {
 		return InternGenericConvertList<T1,N1,N2>()(a,b,db);
 		return InternGenericConvertList<T1,N1,N2>()(a,b,db);
 	}
 	}