summaryrefslogtreecommitdiff
path: root/src/common/utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/utils.h')
-rw-r--r--src/common/utils.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/utils.h b/src/common/utils.h
index ec9cb5416..ba02fc5f1 100644
--- a/src/common/utils.h
+++ b/src/common/utils.h
@@ -31,6 +31,9 @@ void StringBuf_Free(struct StringBuf *);
void findfile(const char *p, const char *pat, void (func)(const char*));
+//Caps values to min/max
+#define cap_value(a, min, max) ((a >= max) ? max : (a <= min) ? min : a)
+
//////////////////////////////////////////////////////////////////////////
// byte word dword access [Shinomori]
//////////////////////////////////////////////////////////////////////////