]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - include/ipatch.h
Centralise compile checks
[xonotic/netradiant.git] / include / ipatch.h
index 81cba69a4ccbcf189a0947282b28532952390350..bf26e8b45e5507b3d82177f54def97ecf8734d64 100644 (file)
@@ -22,6 +22,7 @@
 #if !defined( INCLUDED_IPATCH_H )
 #define INCLUDED_IPATCH_H
 
 #if !defined( INCLUDED_IPATCH_H )
 #define INCLUDED_IPATCH_H
 
+#include "globaldefs.h"
 #include "debugging/debugging.h"
 #include "generic/constant.h"
 #include "generic/vector.h"
 #include "debugging/debugging.h"
 #include "generic/constant.h"
 #include "generic/vector.h"
@@ -62,13 +63,13 @@ const_iterator end() const {
 }
 
 value_type& operator[]( std::size_t index ){
 }
 
 value_type& operator[]( std::size_t index ){
-#if defined( _DEBUG )
+#if GDEF_DEBUG
        ASSERT_MESSAGE( index < size(), "array index out of bounds" );
 #endif
        return m_data[index];
 }
 const value_type& operator[]( std::size_t index ) const {
        ASSERT_MESSAGE( index < size(), "array index out of bounds" );
 #endif
        return m_data[index];
 }
 const value_type& operator[]( std::size_t index ) const {
-#if defined( _DEBUG )
+#if GDEF_DEBUG
        ASSERT_MESSAGE( index < size(), "array index out of bounds" );
 #endif
        return m_data[index];
        ASSERT_MESSAGE( index < size(), "array index out of bounds" );
 #endif
        return m_data[index];
@@ -167,25 +168,25 @@ const_iterator end() const {
 }
 
 value_type& operator[]( std::size_t index ){
 }
 
 value_type& operator[]( std::size_t index ){
-#if defined( _DEBUG )
+#if GDEF_DEBUG
        ASSERT_MESSAGE( index < size(), "array index out of bounds" );
 #endif
        return m_data[index];
 }
 const value_type& operator[]( std::size_t index ) const {
        ASSERT_MESSAGE( index < size(), "array index out of bounds" );
 #endif
        return m_data[index];
 }
 const value_type& operator[]( std::size_t index ) const {
-#if defined( _DEBUG )
+#if GDEF_DEBUG
        ASSERT_MESSAGE( index < size(), "array index out of bounds" );
 #endif
        return m_data[index];
 }
 value_type& operator()( std::size_t x, std::size_t y ){
        ASSERT_MESSAGE( index < size(), "array index out of bounds" );
 #endif
        return m_data[index];
 }
 value_type& operator()( std::size_t x, std::size_t y ){
-#if defined( _DEBUG )
+#if GDEF_DEBUG
        ASSERT_MESSAGE( x < m_x && y < m_y, "array index out of bounds" );
 #endif
        return m_data[x * m_y + y];
 }
 const value_type& operator()( std::size_t x, std::size_t y ) const {
        ASSERT_MESSAGE( x < m_x && y < m_y, "array index out of bounds" );
 #endif
        return m_data[x * m_y + y];
 }
 const value_type& operator()( std::size_t x, std::size_t y ) const {
-#if defined( _DEBUG )
+#if GDEF_DEBUG
        ASSERT_MESSAGE( x < m_x && y < m_y, "array index out of bounds" );
 #endif
        return m_data[x * m_y + y];
        ASSERT_MESSAGE( x < m_x && y < m_y, "array index out of bounds" );
 #endif
        return m_data[x * m_y + y];