Added cast macros so SDL_net will compile with SDL 1.2
--HG-- branch : SDL-1.2 extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%403880
This commit is contained in:
parent
ff18e5fe93
commit
468c6a921c
1 changed files with 10 additions and 0 deletions
|
@ -78,6 +78,16 @@
|
|||
#define SDL_arraysize(array) (sizeof(array)/sizeof(array[0]))
|
||||
#define SDL_TABLESIZE(table) SDL_arraysize(table)
|
||||
|
||||
/* Use proper C++ casts when compiled as C++ to be compatible with the option
|
||||
-Wold-style-cast of GCC (and -Werror=old-style-cast in GCC 4.2 and above. */
|
||||
#ifdef __cplusplus
|
||||
#define SDL_reinterpret_cast(type, expression) reinterpret_cast<type>(expression)
|
||||
#define SDL_static_cast(type, expression) static_cast<type>(expression)
|
||||
#else
|
||||
#define SDL_reinterpret_cast(type, expression) ((type)(expression))
|
||||
#define SDL_static_cast(type, expression) ((type)(expression))
|
||||
#endif
|
||||
|
||||
/** @name Basic data types */
|
||||
/*@{*/
|
||||
typedef enum SDL_bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue