From 36d22d82aa202bb199967e9512281e9a53db42c9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 21:33:14 +0200 Subject: Adding upstream version 115.7.0esr. Signed-off-by: Daniel Baumann --- other-licenses/7zstub/src/CPP/Common/Defs.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 other-licenses/7zstub/src/CPP/Common/Defs.h (limited to 'other-licenses/7zstub/src/CPP/Common/Defs.h') diff --git a/other-licenses/7zstub/src/CPP/Common/Defs.h b/other-licenses/7zstub/src/CPP/Common/Defs.h new file mode 100644 index 0000000000..9416098132 --- /dev/null +++ b/other-licenses/7zstub/src/CPP/Common/Defs.h @@ -0,0 +1,15 @@ +// Common/Defs.h + +#ifndef __COMMON_DEFS_H +#define __COMMON_DEFS_H + +template inline T MyMin(T a, T b) { return a < b ? a : b; } +template inline T MyMax(T a, T b) { return a > b ? a : b; } + +template inline int MyCompare(T a, T b) + { return a == b ? 0 : (a < b ? -1 : 1); } + +inline int BoolToInt(bool v) { return (v ? 1 : 0); } +inline bool IntToBool(int v) { return (v != 0); } + +#endif -- cgit v1.2.3