Use a typedef to avoid conditional compiling

openmw-38
scrawl 9 years ago
parent c912310c52
commit c9d710f334

@ -47,16 +47,14 @@ namespace NifOsg
class ValueInterpolator
{
public:
typedef typename MapT::ValueType ValueT;
ValueInterpolator()
: mDefaultVal(typename MapT::ValueType())
: mDefaultVal(ValueT())
{
}
#ifdef _MSC_VER
ValueInterpolator(boost::shared_ptr<const MapT> keys, typename MapT::ValueType defaultVal = MapT::ValueType())
#else
ValueInterpolator(boost::shared_ptr<const MapT> keys, typename MapT::ValueType defaultVal = typename MapT::ValueType())
#endif
ValueInterpolator(boost::shared_ptr<const MapT> keys, ValueT defaultVal = ValueT())
: mKeys(keys)
, mDefaultVal(defaultVal)
{
@ -67,7 +65,7 @@ namespace NifOsg
}
}
typename MapT::ValueType interpKey(float time) const
ValueT interpKey(float time) const
{
if (empty())
return mDefaultVal;
@ -130,7 +128,7 @@ namespace NifOsg
boost::shared_ptr<const MapT> mKeys;
typename MapT::ValueType mDefaultVal;
ValueT mDefaultVal;
};
struct LerpFunc

Loading…
Cancel
Save