diff options
author | shennetsind <ind@henn.et> | 2013-11-19 02:20:07 -0200 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-11-19 02:20:07 -0200 |
commit | 242bc9fc39c90364dcf5f1a73a6d759efeef0ffd (patch) | |
tree | 0ac9e1e42c5db47d46f5a2d9e9d665b20fb46f63 /src/common/utils.h | |
parent | d076f129c90ac9e3a96659488f702f81def1863a (diff) | |
parent | cb85f27f1ee334982fc3f9dfc1ffe824a1f8905c (diff) | |
download | hercules-242bc9fc39c90364dcf5f1a73a6d759efeef0ffd.tar.gz hercules-242bc9fc39c90364dcf5f1a73a6d759efeef0ffd.tar.bz2 hercules-242bc9fc39c90364dcf5f1a73a6d759efeef0ffd.tar.xz hercules-242bc9fc39c90364dcf5f1a73a6d759efeef0ffd.zip |
Merge branch 'master' of https://github.com/HerculesWS/Hercules
Diffstat (limited to 'src/common/utils.h')
-rw-r--r-- | src/common/utils.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/utils.h b/src/common/utils.h index 3e1463d6b..719e1e533 100644 --- a/src/common/utils.h +++ b/src/common/utils.h @@ -20,7 +20,7 @@ void findfile(const char *p, const char *pat, void (func)(const char*)); bool exists(const char* filename); //Caps values to min/max -#define cap_value(a, min, max) ((a >= max) ? max : (a <= min) ? min : a) +#define cap_value(a, min, max) (((a) >= (max)) ? (max) : ((a) <= (min)) ? (min) : (a)) /// calculates the value of A / B, in percent (rounded down) unsigned int get_percentage(const unsigned int A, const unsigned int B); |