From 5b39dc76f1bc82f941d5c800ab9f34407a06b53a Mon Sep 17 00:00:00 2001 From: Igor Pavlov <87184205+ip7z@users.noreply.github.com> Date: Wed, 21 Jun 2023 00:00:00 +0000 Subject: 23.01 --- CPP/Common/Defs.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'CPP/Common/Defs.h') diff --git a/CPP/Common/Defs.h b/CPP/Common/Defs.h index 9adb88c..e302f35 100644 --- a/CPP/Common/Defs.h +++ b/CPP/Common/Defs.h @@ -1,7 +1,7 @@ // Common/Defs.h -#ifndef __COMMON_DEFS_H -#define __COMMON_DEFS_H +#ifndef ZIP7_INC_COMMON_DEFS_H +#define ZIP7_INC_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; } @@ -10,7 +10,7 @@ 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 unsigned BoolToUInt(bool v) { return (v ? (unsigned)1 : (unsigned)0); } +inline unsigned BoolToUInt(bool v) { return (v ? 1u : 0u); } inline bool IntToBool(int v) { return (v != 0); } #endif -- cgit v1.2.3-55-g6feb