Browse Source

Bugfix in AddAnimationKey, fix warnings (thanks viciious)

Michael Ragazzon 6 years ago
parent
commit
73de134f71

+ 2 - 0
Include/Rocket/Core/Vector2.inl

@@ -70,6 +70,7 @@ Vector2< Type > Vector2< Type >::Normalise() const
 }
 }
 
 
 // Generates a rounded vector from this vector.
 // Generates a rounded vector from this vector.
+template < >
 Vector2< float > Vector2< float >::Round() const
 Vector2< float > Vector2< float >::Round() const
 {
 {
 	Vector2 < float > result;
 	Vector2 < float > result;
@@ -79,6 +80,7 @@ Vector2< float > Vector2< float >::Round() const
 }
 }
 
 
 // Generates a rounded vector from this vector.
 // Generates a rounded vector from this vector.
+template < >
 Vector2< int > Vector2< int >::Round() const
 Vector2< int > Vector2< int >::Round() const
 {
 {
 	return *this;
 	return *this;

+ 6 - 1
Source/Core/ElementAnimation.cpp

@@ -435,9 +435,14 @@ bool ElementAnimation::AddKey(float target_time, const Property & in_property, E
 	}
 	}
 
 
 	if(result)
 	if(result)
-		if(extend_duration) duration = target_time;
+	{
+		if(extend_duration) 
+			duration = target_time;
+	}
 	else
 	else
+	{
 		keys.pop_back();
 		keys.pop_back();
+	}
 
 
 	return result;
 	return result;
 }
 }

+ 2 - 0
Source/Core/PropertyParserAnimation.cpp

@@ -159,6 +159,8 @@ static bool ParseAnimation(Property & property, const StringList& animation_valu
 				case Keyword::PAUSED:
 				case Keyword::PAUSED:
 					animation.paused = true;
 					animation.paused = true;
 					break;
 					break;
+				default:
+					break;
 				}
 				}
 			}
 			}
 			else
 			else