summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schmidt <stefan@osg.samsung.com>2015-11-30 17:22:42 +0100
committerStefan Schmidt <stefan@osg.samsung.com>2015-11-30 17:36:24 +0100
commit3a11868201344c3c79719269a4cebd375b3c3872 (patch)
treeb0fa8d8a45a2758ca8c7a8d59656c64ca8d0df18
parent54abe37c44cae3500b514a6ab3563ff93e330725 (diff)
evas_3d_utils: do not bitwise AND against 0 in condition
We need to check against the state here and if the compilers assignes 0 to the first item in an enum we are screwed here as the bitwise AND will always evaluate to false. This is a re-incarnation from a486671bce76e405a8d7261f19b0f67ca678f0c4
-rw-r--r--src/lib/evas/include/evas_3d_utils.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/evas/include/evas_3d_utils.h b/src/lib/evas/include/evas_3d_utils.h
index 10192cc7c0..52a95116bd 100644
--- a/src/lib/evas/include/evas_3d_utils.h
+++ b/src/lib/evas/include/evas_3d_utils.h
@@ -349,7 +349,7 @@ evas_vec3_transform(Evas_Vec3 *out, const Evas_Vec3 *v, const Eina_Matrix3 *m)
349{ 349{
350 Evas_Vec3 tmp; 350 Evas_Vec3 tmp;
351 351
352 if (eina_matrix3_type_get(m) & EINA_MATRIX_TYPE_IDENTITY) 352 if (eina_matrix3_type_get(m) == EINA_MATRIX_TYPE_IDENTITY)
353 { 353 {
354 evas_vec3_copy(out, v); 354 evas_vec3_copy(out, v);
355 return; 355 return;
@@ -367,7 +367,7 @@ evas_vec3_homogeneous_position_transform(Evas_Vec3 *out, const Evas_Vec3 *v, con
367{ 367{
368 Evas_Vec3 tmp; 368 Evas_Vec3 tmp;
369 369
370 if (eina_matrix4_type_get(m) & EINA_MATRIX_TYPE_IDENTITY) 370 if (eina_matrix4_type_get(m) == EINA_MATRIX_TYPE_IDENTITY)
371 { 371 {
372 evas_vec3_copy(out, v); 372 evas_vec3_copy(out, v);
373 return; 373 return;
@@ -386,7 +386,7 @@ evas_vec3_homogeneous_direction_transform(Evas_Vec3 *out, const Evas_Vec3 *v, co
386{ 386{
387 Evas_Vec3 tmp; 387 Evas_Vec3 tmp;
388 388
389 if (eina_matrix4_type_get(m) & EINA_MATRIX_TYPE_IDENTITY) 389 if (eina_matrix4_type_get(m) == EINA_MATRIX_TYPE_IDENTITY)
390 { 390 {
391 evas_vec3_copy(out, v); 391 evas_vec3_copy(out, v);
392 return; 392 return;
@@ -564,7 +564,7 @@ evas_vec4_transform(Evas_Vec4 *out, const Evas_Vec4 *v, const Eina_Matrix4 *m)
564{ 564{
565 Evas_Vec4 tmp; 565 Evas_Vec4 tmp;
566 566
567 if (eina_matrix4_type_get(m) & EINA_MATRIX_TYPE_IDENTITY) 567 if (eina_matrix4_type_get(m) == EINA_MATRIX_TYPE_IDENTITY)
568 { 568 {
569 evas_vec4_copy(out, v); 569 evas_vec4_copy(out, v);
570 return; 570 return;