diff options
author | Mahmoud Badri <mahmoud.badri@qt.io> | 2019-08-28 11:31:10 +0300 |
---|---|---|
committer | Mahmoud Badri <mahmoud.badri@qt.io> | 2019-08-28 13:17:29 +0300 |
commit | fed1d0a5073041107e0aaf2779e685f1674079e5 (patch) | |
tree | 78acd40b93217965c783acf051990ab6af724b9a | |
parent | dd75a7e02bb368c31864d9261e5f0bb7fbd92bf9 (diff) |
Remove some warnings from Qt3DSDMAnimation.h
Change-Id: Id3c6c202233283c6e05f78f59b9d75fff90344fc
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
-rw-r--r-- | src/dm/systems/Qt3DSDMAnimation.h | 12 | ||||
-rw-r--r-- | src/uipparser/Qt3DSUIPParserImpl.cpp | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/dm/systems/Qt3DSDMAnimation.h b/src/dm/systems/Qt3DSDMAnimation.h index a794964..d4a8f72 100644 --- a/src/dm/systems/Qt3DSDMAnimation.h +++ b/src/dm/systems/Qt3DSDMAnimation.h @@ -672,17 +672,17 @@ inline SBezierKeyframe CreateBezierKeyframeFromEaseInOut(long prevTime, long timeOut = kfTime; float valueOut = kfValue; - // at 100 ease, the control point will be midway between the 2 keyframes + // at 100 ease, the control point will be midway between the 2 keyframes float maxEasePerc = .5f; if (prevTime != -1) { float easeInPerc = qBound(0.f, keyframe.m_EaseIn / 100.f, 1.f) * maxEasePerc; - timeIn = prevTime + (kfTime - prevTime) * (1.f - easeInPerc); + timeIn = prevTime + long((kfTime - prevTime) * (1.f - easeInPerc)); } if (nextTime != -1) { float easeOutPerc = qBound(0.f, keyframe.m_EaseOut / 100.f, 1.f) * maxEasePerc; - timeOut = kfTime + (nextTime - kfTime) * easeOutPerc; + timeOut = kfTime + long((nextTime - kfTime) * easeOutPerc); } return SBezierKeyframe(kfTime, kfValue, timeIn , valueIn, timeOut, valueOut); @@ -749,11 +749,11 @@ struct BezierValuesGetter { std::tuple<long, float, long, float> operator()(const SLinearKeyframe &) const { - return std::make_tuple(-1, 0, -1, 0); + return std::make_tuple(-1, 0.f, -1, 0.f); } std::tuple<long, float, long, float> operator()(const SEaseInEaseOutKeyframe &) const { - return std::make_tuple(-1, 0, -1, 0); + return std::make_tuple(-1, 0.f, -1, 0.f); } std::tuple<long, float, long, float> operator()(const SBezierKeyframe &inValue) const { @@ -763,7 +763,7 @@ struct BezierValuesGetter std::tuple<long, float, long, float> operator()() { QT3DS_ASSERT(false); - return std::make_tuple(-1, 0, -1, 0); + return std::make_tuple(-1, 0.f, -1, 0.f); } }; diff --git a/src/uipparser/Qt3DSUIPParserImpl.cpp b/src/uipparser/Qt3DSUIPParserImpl.cpp index 5ac61bc..60e4317 100644 --- a/src/uipparser/Qt3DSUIPParserImpl.cpp +++ b/src/uipparser/Qt3DSUIPParserImpl.cpp @@ -2461,7 +2461,7 @@ void CUIPParserImpl::CreateBezierKeyframeFromEaseInEaseOutKeyframe( float timeOut = kfTime; float valueOut = kfValue; - // at 100 ease, the control point will be midway between the 2 keyframes + // at 100 ease, the control point will be midway between the 2 keyframes float maxEasePerc = .5f; if (prevTime != -1.f) { |