From fed1d0a5073041107e0aaf2779e685f1674079e5 Mon Sep 17 00:00:00 2001 From: Mahmoud Badri Date: Wed, 28 Aug 2019 11:31:10 +0300 Subject: Remove some warnings from Qt3DSDMAnimation.h Change-Id: Id3c6c202233283c6e05f78f59b9d75fff90344fc Reviewed-by: Miikka Heikkinen --- src/dm/systems/Qt3DSDMAnimation.h | 12 ++++++------ 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 operator()(const SLinearKeyframe &) const { - return std::make_tuple(-1, 0, -1, 0); + return std::make_tuple(-1, 0.f, -1, 0.f); } std::tuple operator()(const SEaseInEaseOutKeyframe &) const { - return std::make_tuple(-1, 0, -1, 0); + return std::make_tuple(-1, 0.f, -1, 0.f); } std::tuple operator()(const SBezierKeyframe &inValue) const { @@ -763,7 +763,7 @@ struct BezierValuesGetter std::tuple 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) { -- cgit v1.2.3