@@ -189,50 +189,50 @@ static CRNLIB_FORCE_INLINE uint64 swap64(uint64 x) {
189189#endif
190190
191191// Assumes x has been read from memory as a little endian value, converts to native endianness for manipulation.
192- CRNLIB_FORCE_INLINE uint16 swap_le16_to_native (uint16 x) {
192+ static CRNLIB_FORCE_INLINE uint16 swap_le16_to_native (uint16 x) {
193193 return c_crnlib_little_endian_platform ? x : swap16 (x);
194194}
195- CRNLIB_FORCE_INLINE uint32 swap_le32_to_native (uint32 x) {
195+ static CRNLIB_FORCE_INLINE uint32 swap_le32_to_native (uint32 x) {
196196 return c_crnlib_little_endian_platform ? x : swap32 (x);
197197}
198- CRNLIB_FORCE_INLINE uint64 swap_le64_to_native (uint64 x) {
198+ static CRNLIB_FORCE_INLINE uint64 swap_le64_to_native (uint64 x) {
199199 return c_crnlib_little_endian_platform ? x : swap64 (x);
200200}
201201
202202// Assumes x has been read from memory as a big endian value, converts to native endianness for manipulation.
203- CRNLIB_FORCE_INLINE uint16 swap_be16_to_native (uint16 x) {
203+ static CRNLIB_FORCE_INLINE uint16 swap_be16_to_native (uint16 x) {
204204 return c_crnlib_big_endian_platform ? x : swap16 (x);
205205}
206- CRNLIB_FORCE_INLINE uint32 swap_be32_to_native (uint32 x) {
206+ static CRNLIB_FORCE_INLINE uint32 swap_be32_to_native (uint32 x) {
207207 return c_crnlib_big_endian_platform ? x : swap32 (x);
208208}
209- CRNLIB_FORCE_INLINE uint64 swap_be64_to_native (uint64 x) {
209+ static CRNLIB_FORCE_INLINE uint64 swap_be64_to_native (uint64 x) {
210210 return c_crnlib_big_endian_platform ? x : swap64 (x);
211211}
212212
213- CRNLIB_FORCE_INLINE uint32 read_le32 (const void * p) {
213+ static CRNLIB_FORCE_INLINE uint32 read_le32 (const void * p) {
214214 return swap_le32_to_native (*static_cast <const uint32*>(p));
215215}
216- CRNLIB_FORCE_INLINE void write_le32 (void * p, uint32 x) {
216+ static CRNLIB_FORCE_INLINE void write_le32 (void * p, uint32 x) {
217217 *static_cast <uint32*>(p) = swap_le32_to_native (x);
218218}
219- CRNLIB_FORCE_INLINE uint64 read_le64 (const void * p) {
219+ static CRNLIB_FORCE_INLINE uint64 read_le64 (const void * p) {
220220 return swap_le64_to_native (*static_cast <const uint64*>(p));
221221}
222- CRNLIB_FORCE_INLINE void write_le64 (void * p, uint64 x) {
222+ static CRNLIB_FORCE_INLINE void write_le64 (void * p, uint64 x) {
223223 *static_cast <uint64*>(p) = swap_le64_to_native (x);
224224}
225225
226- CRNLIB_FORCE_INLINE uint32 read_be32 (const void * p) {
226+ static CRNLIB_FORCE_INLINE uint32 read_be32 (const void * p) {
227227 return swap_be32_to_native (*static_cast <const uint32*>(p));
228228}
229- CRNLIB_FORCE_INLINE void write_be32 (void * p, uint32 x) {
229+ static CRNLIB_FORCE_INLINE void write_be32 (void * p, uint32 x) {
230230 *static_cast <uint32*>(p) = swap_be32_to_native (x);
231231}
232- CRNLIB_FORCE_INLINE uint64 read_be64 (const void * p) {
232+ static CRNLIB_FORCE_INLINE uint64 read_be64 (const void * p) {
233233 return swap_be64_to_native (*static_cast <const uint64*>(p));
234234}
235- CRNLIB_FORCE_INLINE void write_be64 (void * p, uint64 x) {
235+ static CRNLIB_FORCE_INLINE void write_be64 (void * p, uint64 x) {
236236 *static_cast <uint64*>(p) = swap_be64_to_native (x);
237237}
238238
0 commit comments