From 9e0ac4d407688d035ceb90ec765b6ac6b23215cd Mon Sep 17 00:00:00 2001 From: Stephen Gowen Date: Sat, 2 Dec 2017 14:48:35 -0500 Subject: [PATCH] Addressing some warnings. --- spine-cpp/spine-cpp/include/spine/Timeline.h | 2 +- spine-cpp/spine-cpp/src/spine/AnimationState.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spine-cpp/spine-cpp/include/spine/Timeline.h b/spine-cpp/spine-cpp/include/spine/Timeline.h index a33bc4031..606854138 100644 --- a/spine-cpp/spine-cpp/include/spine/Timeline.h +++ b/spine-cpp/spine-cpp/include/spine/Timeline.h @@ -54,7 +54,7 @@ namespace Spine /// @param skeleton The skeleton the timeline is being applied to. This provides access to the bones, slots, and other skeleton components the timeline may change. /// @param lastTime lastTime The time this timeline was last applied. Timelines such as EventTimeline trigger only at specific times rather than every frame. In that case, the timeline triggers everything between lastTime (exclusive) and time (inclusive). /// @param time The time within the animation. Most timelines find the key before and the key after this time so they can interpolate between the keys. - /// @param events If any events are fired, they are added to this array. Can be NULL to ignore firing events or if the timeline does not fire events. May be NULL. + /// @param pEvents If any events are fired, they are added to this array. Can be NULL to ignore firing events or if the timeline does not fire events. May be NULL. /// @param alpha alpha 0 applies the current or setup pose value (depending on pose parameter). 1 applies the timeline /// value. Between 0 and 1 applies a value between the current or setup pose and the timeline value. By adjusting /// alpha over time, an animation can be mixed in or out. alpha can also be useful to diff --git a/spine-cpp/spine-cpp/src/spine/AnimationState.cpp b/spine-cpp/spine-cpp/src/spine/AnimationState.cpp index 5c586c11b..bcac04dcb 100644 --- a/spine-cpp/spine-cpp/src/spine/AnimationState.cpp +++ b/spine-cpp/spine-cpp/src/spine/AnimationState.cpp @@ -805,10 +805,10 @@ namespace Spine bool current = diff > 0, dir = lastTotal >= 0; // Detect cross at 0 (not 180). - if (sign(lastDiff) != sign(diff) && abs(lastDiff) <= 90) + if (sign(lastDiff) != sign(diff) && fabs(lastDiff) <= 90) { // A cross after a 360 rotation is a loop. - if (abs(lastTotal) > 180) + if (fabs(lastTotal) > 180) { lastTotal += 360 * sign(lastTotal); }