Prevent 2 * "warning: converting to 'int' from 'double'"
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Fri, 9 Nov 2007 02:31:36 +0000 (02:31 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Fri, 9 Nov 2007 02:31:36 +0000 (02:31 +0000)
git-svn-id: http://svn.voria.com/code@1122 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-core/trunk/src/synfig/valuenode_animated.cpp

index 08bc6aa..ea91cac 100644 (file)
@@ -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<T>(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<T>(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
                        }