mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-31 06:45:35 +00:00
Fix gcc build error: call of overloaded ‘lerp(const float&, const float&, const float&)’ is ambiguous
/home/elsid/dev/openmw/apps/openmw/mwworld/weather.cpp: In member function ‘void MWWorld::WeatherManager::calculateTransitionResult(float, float)’: /home/elsid/dev/openmw/apps/openmw/mwworld/weather.cpp:1223:33: error: call of overloaded ‘lerp(const float&, const float&, const float&)’ is ambiguous 1223 | mResult.mFogDepth = lerp(current.mFogDepth, other.mFogDepth, factor); | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /home/elsid/dev/OpenSceneGraph/build/gcc/release/install/include/osg/Math:17, from /home/elsid/dev/OpenSceneGraph/build/gcc/release/install/include/osg/Vec2f:17, from /home/elsid/dev/OpenSceneGraph/build/gcc/release/install/include/osg/Vec3f:17, from /home/elsid/dev/openmw/components/esm/defs.hpp:8, from /home/elsid/dev/openmw/components/esm/records.hpp:4, from /home/elsid/dev/openmw/apps/openmw/mwworld/esmstore.hpp:10, from /home/elsid/dev/openmw/build/gcc/fast/apps/openmw/CMakeFiles/openmw.dir/cmake_pch.hxx:5, from <command-line>: /usr/include/c++/12.1.0/cmath:1919:3: note: candidate: ‘constexpr long double std::lerp(long double, long double, long double)’ 1919 | lerp(long double __a, long double __b, long double __t) noexcept | ^~~~ /usr/include/c++/12.1.0/cmath:1915:3: note: candidate: ‘constexpr double std::lerp(double, double, double)’ 1915 | lerp(double __a, double __b, double __t) noexcept | ^~~~ /usr/include/c++/12.1.0/cmath:1911:3: note: candidate: ‘constexpr float std::lerp(float, float, float)’ 1911 | lerp(float __a, float __b, float __t) noexcept | ^~~~ /home/elsid/dev/openmw/apps/openmw/mwworld/weather.cpp:31:11: note: candidate: ‘float {anonymous}::lerp(float, float, float)’ 31 | float lerp (float x, float y, float factor) | ^~~~
This commit is contained in:
parent
8a13cde778
commit
d991b63861
1 changed files with 2 additions and 2 deletions
|
@ -23,6 +23,8 @@
|
|||
|
||||
#include <cmath>
|
||||
|
||||
namespace MWWorld
|
||||
{
|
||||
namespace
|
||||
{
|
||||
static const int invalidWeatherID = -1;
|
||||
|
@ -53,8 +55,6 @@ namespace
|
|||
}
|
||||
}
|
||||
|
||||
namespace MWWorld
|
||||
{
|
||||
template <typename T>
|
||||
T TimeOfDayInterpolator<T>::getValue(const float gameHour, const TimeOfDaySettings& timeSettings, const std::string& prefix) const
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue