diff options
author | Gaius Mulley <gaiusmod2@gmail.com> | 2023-05-13 15:49:50 +0100 |
---|---|---|
committer | Gaius Mulley <gaiusmod2@gmail.com> | 2023-05-13 15:49:50 +0100 |
commit | 2415442489d35a70953e11ac723452f39eb06e26 (patch) | |
tree | 647137763f12302c373683bffdedd5284be2180d /libgm2/libm2pim | |
parent | 8b18714fbb1ca9812b33b3de75fe6ba4a57d4946 (diff) | |
download | gcc-2415442489d35a70953e11ac723452f39eb06e26.zip gcc-2415442489d35a70953e11ac723452f39eb06e26.tar.gz gcc-2415442489d35a70953e11ac723452f39eb06e26.tar.bz2 |
Replace bool as boolean instead of int in libgm2
This patch tidies KeyBoardLEDs.cc, RTco.cc, sckt.cc
and wrapc.cc by removing the TRUE/FALSE macros and using
bool, true and false.
libgm2/ChangeLog:
* libm2cor/KeyBoardLEDs.cc (TRUE): Remove.
(FALSE): Remove.
(init): Replace TRUE with true.
* libm2iso/RTco.cc (TRUE): Remove.
(FALSE): Remove.
(initSem): Replace int with bool.
(init): Replace FALSE with false.
* libm2pim/sckt.cc (TRUE): Remove.
(FALSE): Remove.
* libm2pim/wrapc.cc: Replace TRUE with true
and FALSE with false.
(FALSE): Remove.
(TRUE): Remove.
Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
Diffstat (limited to 'libgm2/libm2pim')
-rw-r--r-- | libgm2/libm2pim/sckt.cc | 7 | ||||
-rw-r--r-- | libgm2/libm2pim/wrapc.cc | 18 |
2 files changed, 6 insertions, 19 deletions
diff --git a/libgm2/libm2pim/sckt.cc b/libgm2/libm2pim/sckt.cc index cd9d9c5..f0b3af0 100644 --- a/libgm2/libm2pim/sckt.cc +++ b/libgm2/libm2pim/sckt.cc @@ -85,13 +85,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #undef DEBUGGING -#if !defined(TRUE) -#define TRUE (1 == 1) -#endif -#if !defined(FALSE) -#define FALSE (1 == 0) -#endif - #if defined(HAVE_SYS_SOCKET_H) #define ERROR(X) \ diff --git a/libgm2/libm2pim/wrapc.cc b/libgm2/libm2pim/wrapc.cc index 0412ccc..c24d214 100644 --- a/libgm2/libm2pim/wrapc.cc +++ b/libgm2/libm2pim/wrapc.cc @@ -59,12 +59,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include <time.h> #endif -/* Define FALSE if one hasn't already been defined. */ - -#if !defined(FALSE) -#define FALSE (1 == 0) -#endif - /* Define a generic NULL if one hasn't already been defined. */ #if !defined(NULL) @@ -214,7 +208,7 @@ EXPORT(signbit) (double r) sizeof(double). */ return signbit (r); #else - return FALSE; + return false; #endif } @@ -227,7 +221,7 @@ EXPORT(signbitl) (long double r) sizeof(double). */ return signbitl (r); #else - return FALSE; + return false; #endif } @@ -240,7 +234,7 @@ EXPORT(signbitf) (float r) sizeof(double). */ return signbitf (r); #else - return FALSE; + return false; #endif } @@ -253,7 +247,7 @@ EXPORT(isfinite) (double x) #if defined(FP_NAN) && defined(FP_INFINITE) return (fpclassify (x) != FP_NAN && fpclassify (x) != FP_INFINITE); #else - return FALSE; + return false; #endif } @@ -266,7 +260,7 @@ EXPORT(isfinitel) (long double x) #if defined(FP_NAN) && defined(FP_INFINITE) return (fpclassify (x) != FP_NAN && fpclassify (x) != FP_INFINITE); #else - return FALSE; + return false; #endif } @@ -279,7 +273,7 @@ EXPORT(isfinitef) (float x) #if defined(FP_NAN) && defined(FP_INFINITE) return (fpclassify (x) != FP_NAN && fpclassify (x) != FP_INFINITE); #else - return FALSE; + return false; #endif } |