diff options
author | Adam Borowski <kilobyte@angband.pl> | 2013-11-14 17:21:58 +0100 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2013-11-15 21:03:43 +0100 |
commit | 04ab49bde8bfadd87c7897b3319238b1da561812 (patch) | |
tree | afd986d551f519de290313bb485d0ee1bfa743c2 /crawl-ref/source/coord.h | |
parent | 51aa1dcc06634d7d1851e964ac63b3c1fca3e1cf (diff) | |
download | crawl-ref-04ab49bde8bfadd87c7897b3319238b1da561812.tar.gz crawl-ref-04ab49bde8bfadd87c7897b3319238b1da561812.zip |
Drop unnecessary parentheses from return statements.
Diffstat (limited to 'crawl-ref/source/coord.h')
-rw-r--r-- | crawl-ref/source/coord.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crawl-ref/source/coord.h b/crawl-ref/source/coord.h index f6c8929537..e7eb162372 100644 --- a/crawl-ref/source/coord.h +++ b/crawl-ref/source/coord.h @@ -5,18 +5,18 @@ coord_def random_in_bounds(); static inline bool in_bounds_x(int x) { - return (x > X_BOUND_1 && x < X_BOUND_2); + return x > X_BOUND_1 && x < X_BOUND_2; } static inline bool in_bounds_y(int y) { - return (y > Y_BOUND_1 && y < Y_BOUND_2); + return y > Y_BOUND_1 && y < Y_BOUND_2; } // Returns true if inside the area the player can move and dig (ie exclusive). static inline bool in_bounds(int x, int y) { - return (x > X_BOUND_1 && x < X_BOUND_2 && y > Y_BOUND_1 && y < Y_BOUND_2); + return x > X_BOUND_1 && x < X_BOUND_2 && y > Y_BOUND_1 && y < Y_BOUND_2; } // Returns true if inside the area the player can map (ie inclusive). @@ -24,7 +24,7 @@ static inline bool in_bounds(int x, int y) // ring of rock to frame the level. static inline bool map_bounds(int x, int y) { - return (x >= X_BOUND_1 && x <= X_BOUND_2 && y >= Y_BOUND_1 && y <= Y_BOUND_2); + return x >= X_BOUND_1 && x <= X_BOUND_2 && y >= Y_BOUND_1 && y <= Y_BOUND_2; } static inline bool in_bounds(const coord_def &p) @@ -47,8 +47,8 @@ bool map_bounds_with_margin(coord_def p, int margin) PURE; // Determines if the coordinate is within bounds of an LOS array. static inline bool show_bounds(const coord_def &p) { - return (p.x >= 0 && p.x < ENV_SHOW_DIAMETER - && p.y >= 0 && p.y < ENV_SHOW_DIAMETER); + return p.x >= 0 && p.x < ENV_SHOW_DIAMETER + && p.y >= 0 && p.y < ENV_SHOW_DIAMETER; } int grid_distance(const coord_def& p1, const coord_def& p2) PURE; |