From f5f63f827731faff2925537ddde65ff34af7ea89 Mon Sep 17 00:00:00 2001 From: Ian Elliott Date: Wed, 18 Feb 2015 12:38:04 -0700 Subject: Win: Can now use "static inline" on Windows (i.e. no code mods). --- include/xglIcd.h | 4 ++-- include/xglPlatform.h | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/xglIcd.h b/include/xglIcd.h index 3efffe6d..1c25936d 100644 --- a/include/xglIcd.h +++ b/include/xglIcd.h @@ -18,12 +18,12 @@ typedef union _XGL_LOADER_DATA { void *loaderData; } XGL_LOADER_DATA; -STATIC_INLINE void set_loader_magic_value(void *pNewObject) { +static inline void set_loader_magic_value(void *pNewObject) { XGL_LOADER_DATA *loader_info = (XGL_LOADER_DATA *) pNewObject; loader_info->loaderMagic = ICD_LOADER_MAGIC; } -STATIC_INLINE bool valid_loader_magic_value(void *pNewObject) { +static inline bool valid_loader_magic_value(void *pNewObject) { const XGL_LOADER_DATA *loader_info = (XGL_LOADER_DATA *) pNewObject; return loader_info->loaderMagic == ICD_LOADER_MAGIC; } diff --git a/include/xglPlatform.h b/include/xglPlatform.h index af006a24..aff2e5b3 100644 --- a/include/xglPlatform.h +++ b/include/xglPlatform.h @@ -44,13 +44,13 @@ extern "C" #define XGLAPI __stdcall // C99: - #define STATIC_INLINE static +#ifndef __cplusplus + #undef inline + #define inline __inline +#endif // __cplusplus #elif defined(__GNUC__) // On other platforms using GCC, XGLAPI stays undefined #define XGLAPI - - // C99: - #define STATIC_INLINE static inline #else // Unsupported Platform! #error "Unsupported OS Platform detected!" -- cgit v1.2.3