From c77181e858653c2de6dfe2a03876f553ed46e1c0 Mon Sep 17 00:00:00 2001 From: jeefo Date: Sun, 11 Sep 2016 21:10:41 +0300 Subject: [PATCH] fixed clang compilation --- include/compress.h | 13 +++++++++++-- include/engine/extdll.h | 5 ----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/include/compress.h b/include/compress.h index 896a8b2..1d2e6dd 100644 --- a/include/compress.h +++ b/include/compress.h @@ -300,15 +300,24 @@ public: { if (((flags >>= 1) & 256) == 0) { - if ((bit = static_cast (fp.GetChar ())) == EOF) + int read = fp.GetChar (); + + if (read == EOF) break; + + bit = static_cast (read); + flags = bit | 0xff00; } if (flags & 1) { - if ((bit = static_cast (fp.GetChar ())) == EOF) + int read = fp.GetChar (); + + if (read == EOF) break; + + bit = static_cast (read); buffer[bufferPtr++] = bit; if (bufferPtr > bufferSize) diff --git a/include/engine/extdll.h b/include/engine/extdll.h index 1e39b6b..b0c944d 100644 --- a/include/engine/extdll.h +++ b/include/engine/extdll.h @@ -32,11 +32,6 @@ #include "windows.h" #include "winsock2.h" #else // _WIN32 -#define FALSE 0 -#define TRUE (!FALSE) -typedef unsigned long ULONG; -typedef uint8 BYTE; -typedef int BOOL; #define MAX_PATH PATH_MAX #include