Skip to content

Commit

Permalink
audio/din: Fix build failures for clang 16.0.6
Browse files Browse the repository at this point in the history
Remove "register" keyword, which is not supported in ISO C++17.

Change applies to 14.0-CURRENT (1400092 and above).
  • Loading branch information
fraggerfox committed Jul 15, 2023
1 parent 788dade commit 487fb7d
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions audio/din/files/patch-src_RtAudio.cpp
@@ -0,0 +1,17 @@
Add support for compiling in ISO C++17
--- src/RtAudio.cpp.orig 2023-07-15 17:18:23 UTC
+++ src/RtAudio.cpp
@@ -10050,8 +10050,13 @@ void RtApi :: byteSwapBuffer( char *buffer, unsigned i

void RtApi :: byteSwapBuffer( char *buffer, unsigned int samples, RtAudioFormat format )
{
+ #if __cplusplus < 201703L
register char val;
register char *ptr;
+ #else
+ char val;
+ char *ptr;
+ #endif

ptr = buffer;
if ( format == RTAUDIO_SINT16 ) {

0 comments on commit 487fb7d

Please sign in to comment.