aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorChristoph Mallon2012-03-15 10:16:45 +0100
committerJohannes Schickel2012-03-17 20:09:49 +0100
commita64b5e2a778333916d6f4b47dc679eba6d34be09 (patch)
treede9cd6197d3bdafc31705b3f2370cb4dd51c2d15 /common
parent757fa01a28163031a6429189e06e45bfa00a2122 (diff)
downloadscummvm-rg350-a64b5e2a778333916d6f4b47dc679eba6d34be09.tar.gz
scummvm-rg350-a64b5e2a778333916d6f4b47dc679eba6d34be09.tar.bz2
scummvm-rg350-a64b5e2a778333916d6f4b47dc679eba6d34be09.zip
ALL: Use GCC_ATLEAST().
Diffstat (limited to 'common')
-rw-r--r--common/endian.h4
-rw-r--r--common/math.h2
-rw-r--r--common/ptr.h4
-rw-r--r--common/scummsys.h2
4 files changed, 6 insertions, 6 deletions
diff --git a/common/endian.h b/common/endian.h
index 9cb703858a..1760dc74b2 100644
--- a/common/endian.h
+++ b/common/endian.h
@@ -86,7 +86,7 @@
}
// Test for GCC >= 4.3.0 as this version added the bswap builtin
-#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
+#elif GCC_ATLEAST(4, 3)
FORCEINLINE uint32 SWAP_BYTES_32(uint32 a) {
return __builtin_bswap32(a);
@@ -156,7 +156,7 @@
//
// Moreover, we activate this code for GCC >= 3.3 but *only* if unaligned access
// is allowed.
-#if defined(__GNUC__) && ((__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3 && !defined(SCUMM_NEED_ALIGNMENT)))
+#if GCC_ATLEAST(4, 0) || (GCC_ATLEAST(3, 3) && !defined(SCUMM_NEED_ALIGNMENT))
FORCEINLINE uint16 READ_UINT16(const void *ptr) {
struct Unaligned16 { uint16 val; } __attribute__ ((__packed__, __may_alias__));
diff --git a/common/math.h b/common/math.h
index f787b84fa6..b85ec0d22a 100644
--- a/common/math.h
+++ b/common/math.h
@@ -75,7 +75,7 @@ struct Complex {
float re, im;
};
-#if defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+#if GCC_ATLEAST(3, 4)
inline int intLog2(uint32 v) {
// This is a slightly optimized implementation of log2 for natural numbers
// targeting gcc. It also saves some binary size over our fallback
diff --git a/common/ptr.h b/common/ptr.h
index 2b0670caae..725d97ec7e 100644
--- a/common/ptr.h
+++ b/common/ptr.h
@@ -103,7 +103,7 @@ private:
*/
template<class T>
class SharedPtr {
-#if !((__GNUC__ == 2) && (__GNUC_MINOR__ >= 95))
+#if !defined __GNUC__ || GCC_ATLEAST(3, 0)
template<class T2> friend class SharedPtr;
#endif
public:
@@ -200,7 +200,7 @@ public:
* This should just be used for debugging purposes.
*/
RefValue refCount() const { return _refCount ? *_refCount : 0; }
-#if !((__GNUC__ == 2) && (__GNUC_MINOR__ >= 95))
+#if !defined __GNUC__ || GCC_ATLEAST(3, 0)
private:
#endif
void decRef() {
diff --git a/common/scummsys.h b/common/scummsys.h
index 85aaa46052..9cac6641c1 100644
--- a/common/scummsys.h
+++ b/common/scummsys.h
@@ -271,7 +271,7 @@
#ifndef FORCEINLINE
#if defined(_MSC_VER)
#define FORCEINLINE __forceinline
- #elif (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
+ #elif GCC_ATLEAST(3, 1)
#define FORCEINLINE inline __attribute__((__always_inline__))
#else
#define FORCEINLINE inline