summaryrefslogtreecommitdiff
path: root/src/stdafx.h
diff options
context:
space:
mode:
authorWim Leflere <wim.leflere@gmail.com>2021-04-11 15:15:37 +0200
committerGitHub <noreply@github.com>2021-04-11 14:15:37 +0100
commit9aebfca083bd36ac1af8d187a6728521aee60386 (patch)
tree8fb0829af2b80ce7e185d0f4affe28aa8e34dd5b /src/stdafx.h
parent31c5b8fe0f9c070143625478f7120e0c9c2332fd (diff)
downloadopenttd-9aebfca083bd36ac1af8d187a6728521aee60386.tar.xz
Fix: clang-cl build (#9018)
Remove macro redefinitions Add final and fallthrough attributes for clang-cl
Diffstat (limited to 'src/stdafx.h')
-rw-r--r--src/stdafx.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/stdafx.h b/src/stdafx.h
index f13104a5b..6a3322345 100644
--- a/src/stdafx.h
+++ b/src/stdafx.h
@@ -113,7 +113,7 @@
#endif
/* Stuff for GCC */
-#if defined(__GNUC__) || defined(__clang__)
+#if defined(__GNUC__) || (defined(__clang__) && !defined(_MSC_VER))
# define NORETURN __attribute__ ((noreturn))
# define CDECL
# define __int64 long long
@@ -196,14 +196,10 @@
# define CDECL _cdecl
# define WARN_FORMAT(string, args)
-# ifndef __clang__
-# define FINAL sealed
-# else
-# define FINAL
-# endif
+# define FINAL final
/* fallthrough attribute, VS 2017 */
-# if (_MSC_VER >= 1910)
+# if (_MSC_VER >= 1910) || defined(__clang__)
# define FALLTHROUGH [[fallthrough]]
# else
# define FALLTHROUGH