Remove use of DECL_CONST
No idea if it was really gaining us anything, but removing it fixes a crash I was getting with libs built with Clang.
This commit is contained in:
parent
1541ff24b8
commit
a758cc8243
@ -1334,8 +1334,8 @@ ALuint ChannelsFromDevFmt(enum DevFmtChannels chans)
|
||||
return 0;
|
||||
}
|
||||
|
||||
DECL_CONST static ALboolean DecomposeDevFormat(ALenum format,
|
||||
enum DevFmtChannels *chans, enum DevFmtType *type)
|
||||
static ALboolean DecomposeDevFormat(ALenum format, enum DevFmtChannels *chans,
|
||||
enum DevFmtType *type)
|
||||
{
|
||||
static const struct {
|
||||
ALenum format;
|
||||
@ -1381,7 +1381,7 @@ DECL_CONST static ALboolean DecomposeDevFormat(ALenum format,
|
||||
return AL_FALSE;
|
||||
}
|
||||
|
||||
DECL_CONST static ALCboolean IsValidALCType(ALCenum type)
|
||||
static ALCboolean IsValidALCType(ALCenum type)
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
@ -1397,7 +1397,7 @@ DECL_CONST static ALCboolean IsValidALCType(ALCenum type)
|
||||
return ALC_FALSE;
|
||||
}
|
||||
|
||||
DECL_CONST static ALCboolean IsValidALCChannels(ALCenum channels)
|
||||
static ALCboolean IsValidALCChannels(ALCenum channels)
|
||||
{
|
||||
switch(channels)
|
||||
{
|
||||
|
@ -290,7 +290,7 @@ void ComputeFirstOrderGainsBF(const BFChannelConfig *chanmap, ALuint numchans, c
|
||||
}
|
||||
|
||||
|
||||
DECL_CONST static inline const char *GetLabelFromChannel(enum Channel channel)
|
||||
static inline const char *GetLabelFromChannel(enum Channel channel)
|
||||
{
|
||||
switch(channel)
|
||||
{
|
||||
|
@ -36,8 +36,8 @@ enum UserFmtChannels {
|
||||
UserFmtBFormat3D = AL_BFORMAT3D_SOFT, /* WXYZ */
|
||||
};
|
||||
|
||||
ALuint BytesFromUserFmt(enum UserFmtType type) DECL_CONST;
|
||||
ALuint ChannelsFromUserFmt(enum UserFmtChannels chans) DECL_CONST;
|
||||
ALuint BytesFromUserFmt(enum UserFmtType type);
|
||||
ALuint ChannelsFromUserFmt(enum UserFmtChannels chans);
|
||||
inline ALuint FrameSizeFromUserFmt(enum UserFmtChannels chans, enum UserFmtType type)
|
||||
{
|
||||
return ChannelsFromUserFmt(chans) * BytesFromUserFmt(type);
|
||||
@ -63,8 +63,8 @@ enum FmtChannels {
|
||||
};
|
||||
#define MAX_INPUT_CHANNELS (8)
|
||||
|
||||
ALuint BytesFromFmt(enum FmtType type) DECL_CONST;
|
||||
ALuint ChannelsFromFmt(enum FmtChannels chans) DECL_CONST;
|
||||
ALuint BytesFromFmt(enum FmtType type);
|
||||
ALuint ChannelsFromFmt(enum FmtChannels chans);
|
||||
inline ALuint FrameSizeFromFmt(enum FmtChannels chans, enum FmtType type)
|
||||
{
|
||||
return ChannelsFromFmt(chans) * BytesFromFmt(type);
|
||||
|
@ -163,10 +163,8 @@ typedef ALuint64SOFT ALuint64;
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define DECL_CONST __attribute__((const))
|
||||
#define DECL_FORMAT(x, y, z) __attribute__((format(x, (y), (z))))
|
||||
#else
|
||||
#define DECL_CONST
|
||||
#define DECL_FORMAT(x, y, z)
|
||||
#endif
|
||||
|
||||
@ -467,8 +465,8 @@ enum DevFmtChannels {
|
||||
};
|
||||
#define MAX_OUTPUT_CHANNELS (16)
|
||||
|
||||
ALuint BytesFromDevFmt(enum DevFmtType type) DECL_CONST;
|
||||
ALuint ChannelsFromDevFmt(enum DevFmtChannels chans) DECL_CONST;
|
||||
ALuint BytesFromDevFmt(enum DevFmtType type);
|
||||
ALuint ChannelsFromDevFmt(enum DevFmtChannels chans);
|
||||
inline ALuint FrameSizeFromDevFmt(enum DevFmtChannels chans, enum DevFmtType type)
|
||||
{
|
||||
return ChannelsFromDevFmt(chans) * BytesFromDevFmt(type);
|
||||
@ -842,8 +840,8 @@ void SetRTPriority(void);
|
||||
void SetDefaultChannelOrder(ALCdevice *device);
|
||||
void SetDefaultWFXChannelOrder(ALCdevice *device);
|
||||
|
||||
const ALCchar *DevFmtTypeString(enum DevFmtType type) DECL_CONST;
|
||||
const ALCchar *DevFmtChannelsString(enum DevFmtChannels chans) DECL_CONST;
|
||||
const ALCchar *DevFmtTypeString(enum DevFmtType type);
|
||||
const ALCchar *DevFmtChannelsString(enum DevFmtChannels chans);
|
||||
|
||||
/**
|
||||
* GetChannelIdxByName
|
||||
|
@ -45,10 +45,10 @@ extern inline struct ALbuffer *RemoveBuffer(ALCdevice *device, ALuint id);
|
||||
extern inline ALuint FrameSizeFromUserFmt(enum UserFmtChannels chans, enum UserFmtType type);
|
||||
extern inline ALuint FrameSizeFromFmt(enum FmtChannels chans, enum FmtType type);
|
||||
|
||||
static ALboolean IsValidType(ALenum type) DECL_CONST;
|
||||
static ALboolean IsValidChannels(ALenum channels) DECL_CONST;
|
||||
static ALboolean DecomposeUserFormat(ALenum format, enum UserFmtChannels *chans, enum UserFmtType *type) DECL_CONST;
|
||||
static ALboolean DecomposeFormat(ALenum format, enum FmtChannels *chans, enum FmtType *type) DECL_CONST;
|
||||
static ALboolean IsValidType(ALenum type);
|
||||
static ALboolean IsValidChannels(ALenum channels);
|
||||
static ALboolean DecomposeUserFormat(ALenum format, enum UserFmtChannels *chans, enum UserFmtType *type);
|
||||
static ALboolean DecomposeFormat(ALenum format, enum FmtChannels *chans, enum FmtType *type);
|
||||
static ALboolean SanitizeAlignment(enum UserFmtType type, ALsizei *align);
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user