diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-03-05 12:19:45 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-03-05 13:02:23 -0800 |
commit | 1b103c5c69083a106e88cb423bab8ade639c71d6 (patch) | |
tree | 0105337ce49ba6b49a1d9f514d284f6e69bd3533 /dive.h | |
parent | 13a2f14be03d0493682917959e0a61bee686eced (diff) | |
download | subsurface-1b103c5c69083a106e88cb423bab8ade639c71d6.tar.gz |
Another small tweak to whitespace tool
clang-format doesn't appear to reindent multi line #define statements
correctly - so this hopefully will clean those up.
The included whitespace corrections to the code should stay in place when
using the updated tool.
This includes cleaning up some multi-line comments that were messed up the
last time around as well as a few other minor changes.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.h')
-rw-r--r-- | dive.h | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -10,16 +10,16 @@ /* Windows has no MIN/MAX macros - so let's just roll our own */ #define MIN(x, y) ({ \ - typeof(x) _min1 = (x); \ - typeof(y) _min2 = (y); \ - (void) (&_min1 == &_min2); \ - _min1 < _min2 ? _min1 : _min2; }) + typeof(x) _min1 = (x); \ + typeof(y) _min2 = (y); \ + (void) (&_min1 == &_min2); \ + _min1 < _min2 ? _min1 : _min2; }) #define MAX(x, y) ({ \ - typeof(x) _max1 = (x); \ - typeof(y) _max2 = (y); \ - (void) (&_max1 == &_max2); \ - _max1 > _max2 ? _max1 : _max2; }) + typeof(x) _max1 = (x); \ + typeof(y) _max2 = (y); \ + (void) (&_max1 == &_max2); \ + _max1 > _max2 ? _max1 : _max2; }) #define IS_FP_SAME(_a, _b) (fabs((_a) - (_b)) < 0.000001 * MAX(fabs(_a), fabs(_b))) @@ -620,13 +620,13 @@ static inline struct divecomputer *get_dive_dc(struct dive *dive, int nr) * it local to the for-loop, but that would make us requires C99. */ #define for_each_dive(_i, _x) \ - for ((_i) = 0; ((_x) = get_dive(_i)) != NULL; (_i)++) + for ((_i) = 0; ((_x) = get_dive(_i)) != NULL; (_i)++) #define for_each_dc(_dive, _dc) \ - for (_dc = &_dive->dc; _dc; _dc = _dc->next) + for (_dc = &_dive->dc; _dc; _dc = _dc->next) #define for_each_gps_location(_i, _x) \ - for ((_i) = 0; ((_x) = get_gps_location(_i, &gps_location_table)) != NULL; (_i)++) + for ((_i) = 0; ((_x) = get_gps_location(_i, &gps_location_table)) != NULL; (_i)++) static inline struct dive *get_dive_by_diveid(uint32_t diveid, uint32_t deviceid) { |