mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
core: remove MIN() and MAX() macros
All have been converted to std::min() and std::max(). Moreover, this was Windows only and since we cross-compile, it is not even clear if this is needed. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
edc0c69943
commit
84219641de
1 changed files with 0 additions and 20 deletions
|
@ -6,26 +6,6 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
// shared generic definitions and macros
|
|
||||||
// mostly about strings, but a couple of math macros are here as well
|
|
||||||
|
|
||||||
/* Windows has no MIN/MAX macros - so let's just roll our own */
|
|
||||||
#ifndef MIN
|
|
||||||
#define MIN(x, y) ({ \
|
|
||||||
__typeof__(x) _min1 = (x); \
|
|
||||||
__typeof__(y) _min2 = (y); \
|
|
||||||
(void) (&_min1 == &_min2); \
|
|
||||||
_min1 < _min2 ? _min1 : _min2; })
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
#define MAX(x, y) ({ \
|
|
||||||
__typeof__(x) _max1 = (x); \
|
|
||||||
__typeof__(y) _max2 = (y); \
|
|
||||||
(void) (&_max1 == &_max2); \
|
|
||||||
_max1 > _max2 ? _max1 : _max2; })
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue