Changeset - r22695:74ef624a6be2
[Not reviewed]
master
0 2 0
frosch - 7 years ago 2017-09-24 13:35:27
frosch@openttd.org
(svn r27916) -Codechange: Enable usage of static_assert for MSVC
2 files changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/stdafx.h
Show inline comments
 
@@ -380,13 +380,13 @@ typedef unsigned char byte;
 
	#define PERSONAL_DIR ""
 
#endif
 

	
 
/* Compile time assertions. Prefer c++0x static_assert().
 
 * Older compilers cannot evaluate some expressions at compile time,
 
 * typically when templates are involved, try assert_tcompile() in those cases. */
 
#if defined(__STDCXX_VERSION__) || defined(__GXX_EXPERIMENTAL_CXX0X__) || defined(__GXX_EXPERIMENTAL_CPP0X__) || defined(static_assert)
 
#if defined(__STDCXX_VERSION__) || defined(__GXX_EXPERIMENTAL_CXX0X__) || defined(__GXX_EXPERIMENTAL_CPP0X__) || defined(static_assert) || (defined(_MSC_VER) && _MSC_VER >= 1600)
 
	/* __STDCXX_VERSION__ is c++0x feature macro, __GXX_EXPERIMENTAL_CXX0X__ is used by gcc, __GXX_EXPERIMENTAL_CPP0X__ by icc */
 
	#define assert_compile(expr) static_assert(expr, #expr )
 
	#define assert_tcompile(expr) assert_compile(expr)
 
#elif defined(__OS2__)
 
	/* Disabled for OS/2 */
 
	#define assert_compile(expr)
src/viewport_sprite_sorter.h
Show inline comments
 
@@ -34,13 +34,13 @@ struct ParentSpriteToDraw {
 
	PaletteID pal;                  ///< palette to use
 
	const SubSprite *sub;           ///< only draw a rectangular part of the sprite
 

	
 
	int32 left;                     ///< minimal screen X coordinate of sprite (= x + sprite->x_offs), reference point for child sprites
 
	int32 top;                      ///< minimal screen Y coordinate of sprite (= y + sprite->y_offs), reference point for child sprites
 

	
 
	int first_child;                ///< the first child to draw.
 
	int32 first_child;              ///< the first child to draw.
 
	bool comparison_done;           ///< Used during sprite sorting: true if sprite has been compared with all other sprites
 
};
 

	
 
typedef SmallVector<ParentSpriteToDraw*, 64> ParentSpriteToSortVector;
 

	
 
/** Type for method for checking whether a viewport sprite sorter exists. */
0 comments (0 inline, 0 general)