diff options
author | Chris Robinson <[email protected]> | 2014-05-22 07:40:22 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-05-22 07:40:22 -0700 |
commit | 100c059157a67345546b256500ed08b146dab2c1 (patch) | |
tree | 1c03de0e4e0891790d781090ad3a7f26a85b8598 /OpenAL32/Include/alMain.h | |
parent | ecdfcdbfa579f07cd91f6796ee8579a470aa68b3 (diff) |
Mark some functions as const
Diffstat (limited to 'OpenAL32/Include/alMain.h')
-rw-r--r-- | OpenAL32/Include/alMain.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index 63787251..6bbcfadb 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -306,9 +306,11 @@ typedef ptrdiff_t ALsizeiptrEXT; #endif #endif -#ifdef HAVE_GCC_FORMAT +#ifdef __GNUC__ +#define CONST_FUNC __attribute__((const)) #define PRINTF_STYLE(x, y) __attribute__((format(printf, (x), (y)))) #else +#define CONST_FUNC #define PRINTF_STYLE(x, y) #endif @@ -577,8 +579,8 @@ enum DevFmtChannels { DevFmtChannelsDefault = DevFmtStereo }; -ALuint BytesFromDevFmt(enum DevFmtType type); -ALuint ChannelsFromDevFmt(enum DevFmtChannels chans); +ALuint BytesFromDevFmt(enum DevFmtType type) CONST_FUNC; +ALuint ChannelsFromDevFmt(enum DevFmtChannels chans) CONST_FUNC; inline ALuint FrameSizeFromDevFmt(enum DevFmtChannels chans, enum DevFmtType type) { return ChannelsFromDevFmt(chans) * BytesFromDevFmt(type); @@ -841,8 +843,8 @@ void SetRTPriority(void); void SetDefaultChannelOrder(ALCdevice *device); void SetDefaultWFXChannelOrder(ALCdevice *device); -const ALCchar *DevFmtTypeString(enum DevFmtType type); -const ALCchar *DevFmtChannelsString(enum DevFmtChannels chans); +const ALCchar *DevFmtTypeString(enum DevFmtType type) CONST_FUNC; +const ALCchar *DevFmtChannelsString(enum DevFmtChannels chans) CONST_FUNC; extern FILE *LogFile; |