From 895a4464b214e49fc1fe279ac2ed49f0491c6fb7 Mon Sep 17 00:00:00 2001 From: Francisco Santos Date: Tue, 6 Dec 2016 10:27:42 +0000 Subject: [PATCH] Redundant break, default being used in switch statement. Change-Id: I1c9d532eec75571074b65fd110bbfd49f8ffbb30 --- .../dali-test-suite-utils/dali-test-suite-utils.h | 35 +++++++++++++++------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/automated-tests/src/dali/dali-test-suite-utils/dali-test-suite-utils.h b/automated-tests/src/dali/dali-test-suite-utils/dali-test-suite-utils.h index 8cefb7c..261d239 100644 --- a/automated-tests/src/dali/dali-test-suite-utils/dali-test-suite-utils.h +++ b/automated-tests/src/dali/dali-test-suite-utils/dali-test-suite-utils.h @@ -162,6 +162,7 @@ inline bool CompareType(Property::Value q1, Property::Value q2, return false; } + bool result = false; switch(type) { case Property::BOOLEAN: @@ -169,7 +170,7 @@ inline bool CompareType(Property::Value q1, Property::Value q2, bool a, b; q1.Get(a); q2.Get(b); - return a == b; + result = a == b; break; } case Property::INTEGER: @@ -177,7 +178,7 @@ inline bool CompareType(Property::Value q1, Property::Value q2, int a, b; q1.Get(a); q2.Get(b); - return a == b; + result = a == b; break; } case Property::FLOAT: @@ -185,7 +186,7 @@ inline bool CompareType(Property::Value q1, Property::Value q2, float a, b; q1.Get(a); q2.Get(b); - return CompareType(a, b, epsilon); + result = CompareType(a, b, epsilon); break; } case Property::VECTOR2: @@ -193,7 +194,7 @@ inline bool CompareType(Property::Value q1, Property::Value q2, Vector2 a, b; q1.Get(a); q2.Get(b); - return CompareType(a, b, epsilon); + result = CompareType(a, b, epsilon); break; } case Property::VECTOR3: @@ -201,7 +202,7 @@ inline bool CompareType(Property::Value q1, Property::Value q2, Vector3 a, b; q1.Get(a); q2.Get(b); - return CompareType(a, b, epsilon); + result = CompareType(a, b, epsilon); break; } case Property::RECTANGLE: @@ -210,7 +211,7 @@ inline bool CompareType(Property::Value q1, Property::Value q2, Vector4 a, b; q1.Get(a); q2.Get(b); - return CompareType(a, b, epsilon); + result = CompareType(a, b, epsilon); break; } case Property::ROTATION: @@ -218,14 +219,28 @@ inline bool CompareType(Property::Value q1, Property::Value q2, Quaternion a, b; q1.Get(a); q2.Get(b); - return CompareType(a, b, epsilon); + result = CompareType(a, b, epsilon); + break; + } + case Property::MATRIX: + case Property::MATRIX3: + case Property::STRING: + case Property::ARRAY: + case Property::MAP: + { + //TODO: Implement this? + DALI_ASSERT_ALWAYS( 0 && "Not implemented"); + result = false; + break; + } + case Property::NONE: + { + result = false; break; } - default: - return false; } - return false; + return result; } -- 2.7.4