mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 15:32:52 +02:00
radiotools.cpp: Don't use register keyword with C++17 standard
Conditionally use register keyword for backward compatibility;
remove for C++17 and later where it is not allowed.
Origin commit data
------------------
Branch: ni/coolstream
Commit: c72cdb8612
Author: Thilo Graf <dbt@novatux.de>
Date: 2024-09-02 (Mon, 02 Sep 2024)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -28,7 +28,11 @@
|
|||||||
|
|
||||||
unsigned short crc16_ccitt(unsigned char *daten, int len, bool skipfirst)
|
unsigned short crc16_ccitt(unsigned char *daten, int len, bool skipfirst)
|
||||||
{
|
{
|
||||||
register unsigned short crc = 0xffff;
|
#if __cplusplus < 201703L
|
||||||
|
register unsigned short crc = 0xffff; // Use register for older standards
|
||||||
|
#else
|
||||||
|
unsigned short crc = 0xffff; // register keyword is not allowed in C++17 and later
|
||||||
|
#endif
|
||||||
|
|
||||||
if (skipfirst) daten++;
|
if (skipfirst) daten++;
|
||||||
while (len--) {
|
while (len--) {
|
||||||
|
Reference in New Issue
Block a user