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); }