Skip to content

Commit 50a27fb

Browse files
authored
Merge pull request #196 from jboynes/fix_volatile
Fix volatile errors when compiling for C++23
2 parents 84b98c7 + 669bf38 commit 50a27fb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

api/RingBuffer.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ void RingBufferN<N>::store_char( uint8_t c )
7777
{
7878
_aucBuffer[_iHead] = c ;
7979
_iHead = nextIndex(_iHead);
80-
_numElems++;
80+
_numElems = _numElems + 1;
8181
}
8282
}
8383

@@ -97,7 +97,7 @@ int RingBufferN<N>::read_char()
9797

9898
uint8_t value = _aucBuffer[_iTail];
9999
_iTail = nextIndex(_iTail);
100-
_numElems--;
100+
_numElems = _numElems - 1;
101101

102102
return value;
103103
}
@@ -138,4 +138,4 @@ bool RingBufferN<N>::isFull()
138138
}
139139

140140
#endif /* _RING_BUFFER_ */
141-
#endif /* __cplusplus */
141+
#endif /* __cplusplus */

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy