Skip to content

Commit

Permalink
external libs, libmodplug: Fix -Wregister warnings from new gcc:
Browse files Browse the repository at this point in the history
  warning: ISO C++17 does not allow 'register' storage class specifier

Noticed in a commit authored by Vitaly Novichkov.
  • Loading branch information
sezero committed Dec 1, 2019
1 parent 476bdab commit 820bb5e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions external/libmodplug-0.8.9.0/src/fastmix.cpp
Expand Up @@ -287,16 +287,22 @@ CzWINDOWEDFIR sfir;
// ----------------------------------------------------------------------------
// MIXING MACROS
// ----------------------------------------------------------------------------
#if defined(__cplusplus) && (__cplusplus >= 201402L)
#define REGISTER
#else
#define REGISTER register
#endif

#define SNDMIX_BEGINSAMPLELOOP8\
register MODCHANNEL * const pChn = pChannel;\
REGISTER MODCHANNEL * const pChn = pChannel;\
nPos = pChn->nPosLo;\
const signed char *p = (signed char *)(pChn->pCurrentSample+pChn->nPos);\
if (pChn->dwFlags & CHN_STEREO) p += pChn->nPos;\
int *pvol = pbuffer;\
do {

#define SNDMIX_BEGINSAMPLELOOP16\
register MODCHANNEL * const pChn = pChannel;\
REGISTER MODCHANNEL * const pChn = pChannel;\
nPos = pChn->nPosLo;\
const signed short *p = (signed short *)(pChn->pCurrentSample+(pChn->nPos*2));\
if (pChn->dwFlags & CHN_STEREO) p += pChn->nPos;\
Expand Down

0 comments on commit 820bb5e

Please sign in to comment.