mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-02 07:21:07 +00:00
Use a typedef to avoid conditional compiling
This commit is contained in:
parent
c912310c52
commit
c9d710f334
@ -47,16 +47,14 @@ namespace NifOsg
|
|||||||
class ValueInterpolator
|
class ValueInterpolator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
typedef typename MapT::ValueType ValueT;
|
||||||
|
|
||||||
ValueInterpolator()
|
ValueInterpolator()
|
||||||
: mDefaultVal(typename MapT::ValueType())
|
: mDefaultVal(ValueT())
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
ValueInterpolator(boost::shared_ptr<const MapT> keys, ValueT defaultVal = ValueT())
|
||||||
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
|
|
||||||
: mKeys(keys)
|
: mKeys(keys)
|
||||||
, mDefaultVal(defaultVal)
|
, mDefaultVal(defaultVal)
|
||||||
{
|
{
|
||||||
@ -67,7 +65,7 @@ namespace NifOsg
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
typename MapT::ValueType interpKey(float time) const
|
ValueT interpKey(float time) const
|
||||||
{
|
{
|
||||||
if (empty())
|
if (empty())
|
||||||
return mDefaultVal;
|
return mDefaultVal;
|
||||||
@ -130,7 +128,7 @@ namespace NifOsg
|
|||||||
|
|
||||||
boost::shared_ptr<const MapT> mKeys;
|
boost::shared_ptr<const MapT> mKeys;
|
||||||
|
|
||||||
typename MapT::ValueType mDefaultVal;
|
ValueT mDefaultVal;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct LerpFunc
|
struct LerpFunc
|
||||||
|
Loading…
x
Reference in New Issue
Block a user