Projekt

Allgemein

Profil

Feature #692

CRC: Make methods const.

Von Maximilian Seesslen vor etwa 11 Stunden hinzugefügt.

Status:
Neu
Priorität:
Normal
Zugewiesen an:
-
Zielversion:
-
Beginn:
24.09.2025
Abgabedatum:
% erledigt:

0%

Geschätzter Aufwand:
CS Zielversion:

Beschreibung

diff --git a/include/biwak/crc.hpp b/include/biwak/crc.hpp
index b6a451f2..db16b3e5 100644
--- a/include/biwak/crc.hpp
+++ b/include/biwak/crc.hpp
@ -42,8 +42,8 @ class CCrc
void init();
uint32_t calculateCrc32( const void *_buf, uint32_t len );

- uint32_t crc32Init( );
- uint32_t crc32Update( uint32_t crc, const void *_buf, uint32_t len );
+ uint32_t crc32Init( ) const;
+ uint32_t crc32Update( uint32_t crc, const void *_buf, uint32_t len ) const;
uint32_t crc32Finalize( uint32_t crc );
};

diff --git a/src/stm32/crc.cpp b/src/stm32/crc.cpp
index 08261dbc..d6958420 100644
--- a/src/stm32/crc.cpp
+++ b/src/stm32/crc.cpp
@ -73,7 +73,7 @ uint32_t CCrc::calculateCrc32( const void *_buf, uint32_t len)
return(crc);
}

-uint32_t CCrc::crc32Update( uint32_t crc, const void *_buf, uint32_t len )
+uint32_t CCrc::crc32Update( uint32_t crc, const void *_buf, uint32_t len ) const {
#if defined( STM32F1 )
uint32_t part;

Auch abrufbar als: Atom PDF