Skip to content
Snippets Groups Projects
Commit a0a91a79 authored by Holger Obermaier's avatar Holger Obermaier
Browse files

In C++, the min and max functions exist as templates and do not have to be defined as macros

parent 1cfccaf5
No related branches found
No related tags found
1 merge request!2Develop porting from c to cpp
......@@ -3,6 +3,7 @@
#include <cmath>
#include <cstring>
#include <algorithm> // min, max
#ifdef _GNU_SOURCE
#define STRSTRCOMP(A, B) strcasestr((A), (B))
......@@ -22,9 +23,8 @@
#define iround(x) ((int)(floor)((x) + 0.5))
#define min(x, y) (((x) < (y))?(x):(y))
#define max(x, y) (((x) < (y))?(y):(x))
using std::min;
using std::max;
#define fsign(x) (((x) < 0.0)?(-1):1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment