@@ -189,50 +189,50 @@ static CRNLIB_FORCE_INLINE uint64 swap64(uint64 x) {
189
189
#endif
190
190
191
191
// 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) {
193
193
return c_crnlib_little_endian_platform ? x : swap16 (x);
194
194
}
195
- CRNLIB_FORCE_INLINE uint32 swap_le32_to_native (uint32 x) {
195
+ static CRNLIB_FORCE_INLINE uint32 swap_le32_to_native (uint32 x) {
196
196
return c_crnlib_little_endian_platform ? x : swap32 (x);
197
197
}
198
- CRNLIB_FORCE_INLINE uint64 swap_le64_to_native (uint64 x) {
198
+ static CRNLIB_FORCE_INLINE uint64 swap_le64_to_native (uint64 x) {
199
199
return c_crnlib_little_endian_platform ? x : swap64 (x);
200
200
}
201
201
202
202
// 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) {
204
204
return c_crnlib_big_endian_platform ? x : swap16 (x);
205
205
}
206
- CRNLIB_FORCE_INLINE uint32 swap_be32_to_native (uint32 x) {
206
+ static CRNLIB_FORCE_INLINE uint32 swap_be32_to_native (uint32 x) {
207
207
return c_crnlib_big_endian_platform ? x : swap32 (x);
208
208
}
209
- CRNLIB_FORCE_INLINE uint64 swap_be64_to_native (uint64 x) {
209
+ static CRNLIB_FORCE_INLINE uint64 swap_be64_to_native (uint64 x) {
210
210
return c_crnlib_big_endian_platform ? x : swap64 (x);
211
211
}
212
212
213
- CRNLIB_FORCE_INLINE uint32 read_le32 (const void * p) {
213
+ static CRNLIB_FORCE_INLINE uint32 read_le32 (const void * p) {
214
214
return swap_le32_to_native (*static_cast <const uint32*>(p));
215
215
}
216
- CRNLIB_FORCE_INLINE void write_le32 (void * p, uint32 x) {
216
+ static CRNLIB_FORCE_INLINE void write_le32 (void * p, uint32 x) {
217
217
*static_cast <uint32*>(p) = swap_le32_to_native (x);
218
218
}
219
- CRNLIB_FORCE_INLINE uint64 read_le64 (const void * p) {
219
+ static CRNLIB_FORCE_INLINE uint64 read_le64 (const void * p) {
220
220
return swap_le64_to_native (*static_cast <const uint64*>(p));
221
221
}
222
- CRNLIB_FORCE_INLINE void write_le64 (void * p, uint64 x) {
222
+ static CRNLIB_FORCE_INLINE void write_le64 (void * p, uint64 x) {
223
223
*static_cast <uint64*>(p) = swap_le64_to_native (x);
224
224
}
225
225
226
- CRNLIB_FORCE_INLINE uint32 read_be32 (const void * p) {
226
+ static CRNLIB_FORCE_INLINE uint32 read_be32 (const void * p) {
227
227
return swap_be32_to_native (*static_cast <const uint32*>(p));
228
228
}
229
- CRNLIB_FORCE_INLINE void write_be32 (void * p, uint32 x) {
229
+ static CRNLIB_FORCE_INLINE void write_be32 (void * p, uint32 x) {
230
230
*static_cast <uint32*>(p) = swap_be32_to_native (x);
231
231
}
232
- CRNLIB_FORCE_INLINE uint64 read_be64 (const void * p) {
232
+ static CRNLIB_FORCE_INLINE uint64 read_be64 (const void * p) {
233
233
return swap_be64_to_native (*static_cast <const uint64*>(p));
234
234
}
235
- CRNLIB_FORCE_INLINE void write_be64 (void * p, uint64 x) {
235
+ static CRNLIB_FORCE_INLINE void write_be64 (void * p, uint64 x) {
236
236
*static_cast <uint64*>(p) = swap_be64_to_native (x);
237
237
}
238
238
0 commit comments