summaryrefslogtreecommitdiffhomepage
path: root/compat
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-02-16 11:03:01 +0100
committerStanislaw Halik <sthalik@misaki.pl>2018-02-16 11:04:50 +0100
commit9d4f5245630d2cac5f4a479dee2f6a7b358c8ef9 (patch)
tree724d12624003b917d9dbd99b50c8a253d32fc845 /compat
parenta546be886f6062c82c2b5fa88d150532e7f4172a (diff)
compat/macros: cleanup
Remove cruft, adjust usages.
Diffstat (limited to 'compat')
-rw-r--r--compat/macros.hpp30
1 files changed, 2 insertions, 28 deletions
diff --git a/compat/macros.hpp b/compat/macros.hpp
index 7c017d3e..df71b1f3 100644
--- a/compat/macros.hpp
+++ b/compat/macros.hpp
@@ -21,28 +21,14 @@
# define never_inline
#endif
-#if defined __GNUG__
+#if defined __cplusplus
# define restrict_ptr __restrict
-#elif defined _MSC_VER
-# define restrict_ptr __restrict
-#else
-# define restrict_ptr
-#endif
-
-#if defined _MSC_VER
-# define restrict_ref restrict_ptr
-#elif defined __GNUG__
-# define restrict_ref restrict_ptr
-#else
-# define restrict_ref
#endif
#if defined _MSC_VER
# define force_inline __forceinline
-#elif defined __GNUG__
-# define force_inline __attribute__((always_inline, gnu_inline)) inline
#else
-# define force_inline inline
+# define force_inline __attribute__((always_inline, gnu_inline)) inline
#endif
#ifdef Q_CREATOR_RUN
@@ -53,18 +39,6 @@
# define warn_result_unused __attribute__((warn_unused_result))
#endif
-#if defined __GNUG__
-# define unused(t, i) t __attribute__((unused)) i
-#else
-# define unused(t, i) t
-#endif
-
-#if defined _MSC_VER
-# define aligned_struct(x) struct __declspec(align(x))
-#else
-# define aligned_struct(x) struct __attribute__((__aligned__(x)))
-#endif
-
#if defined __GNUC__
# define likely(x) __builtin_expect(!!(x),1)
# define unlikely(x) __builtin_expect(!!(x),0)