From: dooglus Date: Fri, 9 Nov 2007 02:31:36 +0000 (+0000) Subject: Prevent 2 * "warning: converting to 'int' from 'double'" X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=7a2a252e5f20c4606bc2f0e5cf8868771aa98d11;p=synfig.git Prevent 2 * "warning: converting to 'int' from 'double'" git-svn-id: http://svn.voria.com/code@1122 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-core/trunk/src/synfig/valuenode_animated.cpp b/synfig-core/trunk/src/synfig/valuenode_animated.cpp index 08bc6aa..ea91cac 100644 --- a/synfig-core/trunk/src/synfig/valuenode_animated.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_animated.cpp @@ -464,24 +464,24 @@ public: // if this isn't the first curve else if(iter_get_after != INTERPOLATION_LINEAR && !curve_list.empty()) // adjust it for the curve that came before it - curve.second.t1() *= + curve.second.t1() = static_cast(curve.second.t1() * // cast to prevent warning // (time span of this curve) * 1.5 // ----------------------------------------------------------------- // ((time span of this curve) * 0.5) + (time span of previous curve) - (curve.second.get_dt()*(timeadjust+1)) / - (curve.second.get_dt()*timeadjust + curve_list.back().second.get_dt()); + (curve.second.get_dt()*(timeadjust+1)) / + (curve.second.get_dt()*timeadjust + curve_list.back().second.get_dt())); if(next_get_before==INTERPOLATION_HALT) curve.second.t2()*=0; // if this isn't the last curve else if(next_get_before != INTERPOLATION_LINEAR && after_next!=waypoint_list_.end()) // adjust it for the curve that came after it - curve.second.t2() *= + curve.second.t2() = static_cast(curve.second.t2() * // cast to prevent warning // (time span of this curve) * 1.5 // ------------------------------------------------------------- // ((time span of this curve) * 0.5) + (time span of next curve) - (curve.second.get_dt()*(timeadjust+1)) / - (curve.second.get_dt()*timeadjust+(after_next->get_time()-next->get_time())); + (curve.second.get_dt()*(timeadjust+1)) / + (curve.second.get_dt()*timeadjust+(after_next->get_time()-next->get_time()))); } // not CONSTANT }