diff --git a/u02/src/util.cpp b/u02/src/util.cpp index 78369d0..865136a 100644 --- a/u02/src/util.cpp +++ b/u02/src/util.cpp @@ -3,18 +3,18 @@ #include void transform_mut(Transformation transformation, int &x, int &y) { - if ((transformation & TRANSFORM_ROTATE_CW) != 0) { + if (transformation & TRANSFORM_ROTATE_CW) { std::swap(x, y); x = -x; } - if ((transformation & TRANSFORM_ROTATE_CCW) != 0) { + if (transformation & TRANSFORM_ROTATE_CCW) { std::swap(x, y); y = -y; } - if ((transformation & TRANSFORM_MIRROR_X) != 0) { + if (transformation & TRANSFORM_MIRROR_X) { y = -y; } - if ((transformation & TRANSFORM_MIRROR_Y) != 0) { + if (transformation & TRANSFORM_MIRROR_Y) { x = -x; } } @@ -25,10 +25,10 @@ std::pair transform(Transformation transformation, int x, int y) { } void transform_inv_mut(Transformation transformation, int &x, int &y) { - if ((transformation & TRANSFORM_MIRROR_Y) != 0) { + if (transformation & TRANSFORM_MIRROR_Y) { x = -x; } - if ((transformation & TRANSFORM_MIRROR_X) != 0) { + if (transformation & TRANSFORM_MIRROR_X) { y = -y; } if (transformation & TRANSFORM_ROTATE_CCW) {