From a4e371af4bb6873691cfe4b7b11985c1e330bbd0 Mon Sep 17 00:00:00 2001 From: aramis_acg Date: Tue, 31 May 2011 14:33:46 +0000 Subject: [PATCH] # 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 --- code/STEPFile.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/code/STEPFile.h b/code/STEPFile.h index 93b99d6e2..83757a882 100644 --- a/code/STEPFile.h +++ b/code/STEPFile.h @@ -731,7 +731,7 @@ namespace STEP { // ------------------------------------------------------------------------------ template 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{ out = dynamic_cast< const typename PickBaseType::Type& > ( *in ); } @@ -743,14 +743,14 @@ namespace STEP { template <> 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; } }; template struct InternGenericConvert< Maybe > { - void operator()(Maybe& out, boost::shared_ptr< const EXPRESS::DataType >& in, const STEP::DB& db) { + void operator()(Maybe& out, const boost::shared_ptr< const EXPRESS::DataType >& in, const STEP::DB& db) { GenericConvert((T&)out,in,db); out.flag_valid(); } @@ -758,7 +758,7 @@ namespace STEP { template struct InternGenericConvertList { - void operator()(ListOf& out, boost::shared_ptr< const EXPRESS::DataType >& inp_base, const STEP::DB& db) { + void operator()(ListOf& out, const boost::shared_ptr< const EXPRESS::DataType >& inp_base, const STEP::DB& db) { const EXPRESS::LIST* inp = dynamic_cast(inp_base.get()); if (!inp) { @@ -789,7 +789,7 @@ namespace STEP { template struct InternGenericConvert< Lazy > { - void operator()(Lazy& out, boost::shared_ptr< const EXPRESS::DataType >& in_base, const STEP::DB& db) { + void operator()(Lazy& out, const boost::shared_ptr< const EXPRESS::DataType >& in_base, const STEP::DB& db) { const EXPRESS::ENTITY* in = dynamic_cast(in_base.get()); if (!in) { throw TypeError("type error reading entity"); @@ -799,12 +799,12 @@ namespace STEP { }; template - 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()(a,b,db); } template - inline void GenericConvert(ListOf& a, boost::shared_ptr< const EXPRESS::DataType >& b, const STEP::DB& db) { + inline void GenericConvert(ListOf& a, const boost::shared_ptr< const EXPRESS::DataType >& b, const STEP::DB& db) { return InternGenericConvertList()(a,b,db); }