mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-18 00:32:11 +01:00
Make wuffs_base__load_etc arg const
This commit is contained in:
1 parent
bc546b7383
commit
3afdd91acb
3 files changed
+34
-34
No files matched your search
@@ -465,74 +465,74 @@ wuffs_base__count_leading_zeroes_u64(uint64_t u) {
|
||||
wuffs_base__load_u8__no_bounds_check
|
||||
|
||||
static inline uint8_t //
|
||||
wuffs_base__load_u8__no_bounds_check(uint8_t* p) {
|
||||
wuffs_base__load_u8__no_bounds_check(const uint8_t* p) {
|
||||
return p[0];
|
||||
}
|
||||
|
||||
static inline uint16_t //
|
||||
wuffs_base__load_u16be__no_bounds_check(uint8_t* p) {
|
||||
wuffs_base__load_u16be__no_bounds_check(const uint8_t* p) {
|
||||
return (uint16_t)(((uint16_t)(p[0]) << 8) | ((uint16_t)(p[1]) << 0));
|
||||
}
|
||||
|
||||
static inline uint16_t //
|
||||
wuffs_base__load_u16le__no_bounds_check(uint8_t* p) {
|
||||
wuffs_base__load_u16le__no_bounds_check(const uint8_t* p) {
|
||||
return (uint16_t)(((uint16_t)(p[0]) << 0) | ((uint16_t)(p[1]) << 8));
|
||||
}
|
||||
|
||||
static inline uint32_t //
|
||||
wuffs_base__load_u24be__no_bounds_check(uint8_t* p) {
|
||||
wuffs_base__load_u24be__no_bounds_check(const uint8_t* p) {
|
||||
return ((uint32_t)(p[0]) << 16) | ((uint32_t)(p[1]) << 8) |
|
||||
((uint32_t)(p[2]) << 0);
|
||||
}
|
||||
|
||||
static inline uint32_t //
|
||||
wuffs_base__load_u24le__no_bounds_check(uint8_t* p) {
|
||||
wuffs_base__load_u24le__no_bounds_check(const uint8_t* p) {
|
||||
return ((uint32_t)(p[0]) << 0) | ((uint32_t)(p[1]) << 8) |
|
||||
((uint32_t)(p[2]) << 16);
|
||||
}
|
||||
|
||||
static inline uint32_t //
|
||||
wuffs_base__load_u32be__no_bounds_check(uint8_t* p) {
|
||||
wuffs_base__load_u32be__no_bounds_check(const uint8_t* p) {
|
||||
return ((uint32_t)(p[0]) << 24) | ((uint32_t)(p[1]) << 16) |
|
||||
((uint32_t)(p[2]) << 8) | ((uint32_t)(p[3]) << 0);
|
||||
}
|
||||
|
||||
static inline uint32_t //
|
||||
wuffs_base__load_u32le__no_bounds_check(uint8_t* p) {
|
||||
wuffs_base__load_u32le__no_bounds_check(const uint8_t* p) {
|
||||
return ((uint32_t)(p[0]) << 0) | ((uint32_t)(p[1]) << 8) |
|
||||
((uint32_t)(p[2]) << 16) | ((uint32_t)(p[3]) << 24);
|
||||
}
|
||||
|
||||
static inline uint64_t //
|
||||
wuffs_base__load_u40be__no_bounds_check(uint8_t* p) {
|
||||
wuffs_base__load_u40be__no_bounds_check(const uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 32) | ((uint64_t)(p[1]) << 24) |
|
||||
((uint64_t)(p[2]) << 16) | ((uint64_t)(p[3]) << 8) |
|
||||
((uint64_t)(p[4]) << 0);
|
||||
}
|
||||
|
||||
static inline uint64_t //
|
||||
wuffs_base__load_u40le__no_bounds_check(uint8_t* p) {
|
||||
wuffs_base__load_u40le__no_bounds_check(const uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 0) | ((uint64_t)(p[1]) << 8) |
|
||||
((uint64_t)(p[2]) << 16) | ((uint64_t)(p[3]) << 24) |
|
||||
((uint64_t)(p[4]) << 32);
|
||||
}
|
||||
|
||||
static inline uint64_t //
|
||||
wuffs_base__load_u48be__no_bounds_check(uint8_t* p) {
|
||||
wuffs_base__load_u48be__no_bounds_check(const uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 40) | ((uint64_t)(p[1]) << 32) |
|
||||
((uint64_t)(p[2]) << 24) | ((uint64_t)(p[3]) << 16) |
|
||||
((uint64_t)(p[4]) << 8) | ((uint64_t)(p[5]) << 0);
|
||||
}
|
||||
|
||||
static inline uint64_t //
|
||||
wuffs_base__load_u48le__no_bounds_check(uint8_t* p) {
|
||||
wuffs_base__load_u48le__no_bounds_check(const uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 0) | ((uint64_t)(p[1]) << 8) |
|
||||
((uint64_t)(p[2]) << 16) | ((uint64_t)(p[3]) << 24) |
|
||||
((uint64_t)(p[4]) << 32) | ((uint64_t)(p[5]) << 40);
|
||||
}
|
||||
|
||||
static inline uint64_t //
|
||||
wuffs_base__load_u56be__no_bounds_check(uint8_t* p) {
|
||||
wuffs_base__load_u56be__no_bounds_check(const uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 48) | ((uint64_t)(p[1]) << 40) |
|
||||
((uint64_t)(p[2]) << 32) | ((uint64_t)(p[3]) << 24) |
|
||||
((uint64_t)(p[4]) << 16) | ((uint64_t)(p[5]) << 8) |
|
||||
@@ -540,7 +540,7 @@ wuffs_base__load_u56be__no_bounds_check(uint8_t* p) {
|
||||
}
|
||||
|
||||
static inline uint64_t //
|
||||
wuffs_base__load_u56le__no_bounds_check(uint8_t* p) {
|
||||
wuffs_base__load_u56le__no_bounds_check(const uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 0) | ((uint64_t)(p[1]) << 8) |
|
||||
((uint64_t)(p[2]) << 16) | ((uint64_t)(p[3]) << 24) |
|
||||
((uint64_t)(p[4]) << 32) | ((uint64_t)(p[5]) << 40) |
|
||||
@@ -548,7 +548,7 @@ wuffs_base__load_u56le__no_bounds_check(uint8_t* p) {
|
||||
}
|
||||
|
||||
static inline uint64_t //
|
||||
wuffs_base__load_u64be__no_bounds_check(uint8_t* p) {
|
||||
wuffs_base__load_u64be__no_bounds_check(const uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 56) | ((uint64_t)(p[1]) << 48) |
|
||||
((uint64_t)(p[2]) << 40) | ((uint64_t)(p[3]) << 32) |
|
||||
((uint64_t)(p[4]) << 24) | ((uint64_t)(p[5]) << 16) |
|
||||
@@ -556,7 +556,7 @@ wuffs_base__load_u64be__no_bounds_check(uint8_t* p) {
|
||||
}
|
||||
|
||||
static inline uint64_t //
|
||||
wuffs_base__load_u64le__no_bounds_check(uint8_t* p) {
|
||||
wuffs_base__load_u64le__no_bounds_check(const uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 0) | ((uint64_t)(p[1]) << 8) |
|
||||
((uint64_t)(p[2]) << 16) | ((uint64_t)(p[3]) << 24) |
|
||||
((uint64_t)(p[4]) << 32) | ((uint64_t)(p[5]) << 40) |
|
||||
|
||||
@@ -226,10 +226,10 @@ const baseFundamentalPublicH = "" +
|
||||
"" +
|
||||
"// --------\n\n#if defined(__GNUC__) && (__SIZEOF_LONG__ == 8)\n\nstatic inline uint32_t //\nwuffs_base__count_leading_zeroes_u64(uint64_t u) {\n return u ? ((uint32_t)(__builtin_clzl(u))) : 64u;\n}\n\n#else\n\nstatic inline uint32_t //\nwuffs_base__count_leading_zeroes_u64(uint64_t u) {\n if (u == 0) {\n return 64;\n }\n\n uint32_t n = 0;\n if ((u >> 32) == 0) {\n n |= 32;\n u <<= 32;\n }\n if ((u >> 48) == 0) {\n n |= 16;\n u <<= 16;\n }\n if ((u >> 56) == 0) {\n n |= 8;\n u <<= 8;\n }\n if ((u >> 60) == 0) {\n n |= 4;\n u <<= 4;\n }\n if ((u >> 62) == 0) {\n n |= 2;\n u <<= 2;\n }\n if ((u >> 63) == 0) {\n n |= 1;\n u <<= 1;\n }\n return n;\n}\n\n#endif // defined(__GNUC__) && (__SIZEOF_LONG__ == 8)\n\n " +
|
||||
"" +
|
||||
"// --------\n\n#define wuffs_base__load_u8be__no_bounds_check \\\n wuffs_base__load_u8__no_bounds_check\n#define wuffs_base__load_u8le__no_bounds_check \\\n wuffs_base__load_u8__no_bounds_check\n\nstatic inline uint8_t //\nwuffs_base__load_u8__no_bounds_check(uint8_t* p) {\n return p[0];\n}\n\nstatic inline uint16_t //\nwuffs_base__load_u16be__no_bounds_check(uint8_t* p) {\n return (uint16_t)(((uint16_t)(p[0]) << 8) | ((uint16_t)(p[1]) << 0));\n}\n\nstatic inline uint16_t //\nwuffs_base__load_u16le__no_bounds_check(uint8_t* p) {\n return (uint16_t)(((uint16_t)(p[0]) << 0) | ((uint16_t)(p[1]) << 8));\n}\n\nstatic inline uint32_t //\nwuffs_base__load_u24be__no_bounds_check(uint8_t* p) {\n return ((uint32_t)(p[0]) << 16) | ((uint32_t)(p[1]) << 8) |\n ((uint32_t)(p[2]) << 0);\n}\n\nstatic inline uint32_t //\nwuffs_base__load_u24le__no_bounds_check(uint8_t* p) {\n return ((uint32_t)(p[0]) << 0) | ((uint32_t)(p[1]) << 8) |\n ((uint32_t)(p[2]) << 16);\n}\n\nstatic inline uint32_t //\nwuffs_base__load_u32be__no_bounds_check(" +
|
||||
"uint8_t* p) {\n return ((uint32_t)(p[0]) << 24) | ((uint32_t)(p[1]) << 16) |\n ((uint32_t)(p[2]) << 8) | ((uint32_t)(p[3]) << 0);\n}\n\nstatic inline uint32_t //\nwuffs_base__load_u32le__no_bounds_check(uint8_t* p) {\n return ((uint32_t)(p[0]) << 0) | ((uint32_t)(p[1]) << 8) |\n ((uint32_t)(p[2]) << 16) | ((uint32_t)(p[3]) << 24);\n}\n\nstatic inline uint64_t //\nwuffs_base__load_u40be__no_bounds_check(uint8_t* p) {\n return ((uint64_t)(p[0]) << 32) | ((uint64_t)(p[1]) << 24) |\n ((uint64_t)(p[2]) << 16) | ((uint64_t)(p[3]) << 8) |\n ((uint64_t)(p[4]) << 0);\n}\n\nstatic inline uint64_t //\nwuffs_base__load_u40le__no_bounds_check(uint8_t* p) {\n return ((uint64_t)(p[0]) << 0) | ((uint64_t)(p[1]) << 8) |\n ((uint64_t)(p[2]) << 16) | ((uint64_t)(p[3]) << 24) |\n ((uint64_t)(p[4]) << 32);\n}\n\nstatic inline uint64_t //\nwuffs_base__load_u48be__no_bounds_check(uint8_t* p) {\n return ((uint64_t)(p[0]) << 40) | ((uint64_t)(p[1]) << 32) |\n ((uint64_t)(p[2]) << 24) | ((uint64_t)" +
|
||||
"(p[3]) << 16) |\n ((uint64_t)(p[4]) << 8) | ((uint64_t)(p[5]) << 0);\n}\n\nstatic inline uint64_t //\nwuffs_base__load_u48le__no_bounds_check(uint8_t* p) {\n return ((uint64_t)(p[0]) << 0) | ((uint64_t)(p[1]) << 8) |\n ((uint64_t)(p[2]) << 16) | ((uint64_t)(p[3]) << 24) |\n ((uint64_t)(p[4]) << 32) | ((uint64_t)(p[5]) << 40);\n}\n\nstatic inline uint64_t //\nwuffs_base__load_u56be__no_bounds_check(uint8_t* p) {\n return ((uint64_t)(p[0]) << 48) | ((uint64_t)(p[1]) << 40) |\n ((uint64_t)(p[2]) << 32) | ((uint64_t)(p[3]) << 24) |\n ((uint64_t)(p[4]) << 16) | ((uint64_t)(p[5]) << 8) |\n ((uint64_t)(p[6]) << 0);\n}\n\nstatic inline uint64_t //\nwuffs_base__load_u56le__no_bounds_check(uint8_t* p) {\n return ((uint64_t)(p[0]) << 0) | ((uint64_t)(p[1]) << 8) |\n ((uint64_t)(p[2]) << 16) | ((uint64_t)(p[3]) << 24) |\n ((uint64_t)(p[4]) << 32) | ((uint64_t)(p[5]) << 40) |\n ((uint64_t)(p[6]) << 48);\n}\n\nstatic inline uint64_t //\nwuffs_base__load_u64be__no_bounds_ch" +
|
||||
"eck(uint8_t* p) {\n return ((uint64_t)(p[0]) << 56) | ((uint64_t)(p[1]) << 48) |\n ((uint64_t)(p[2]) << 40) | ((uint64_t)(p[3]) << 32) |\n ((uint64_t)(p[4]) << 24) | ((uint64_t)(p[5]) << 16) |\n ((uint64_t)(p[6]) << 8) | ((uint64_t)(p[7]) << 0);\n}\n\nstatic inline uint64_t //\nwuffs_base__load_u64le__no_bounds_check(uint8_t* p) {\n return ((uint64_t)(p[0]) << 0) | ((uint64_t)(p[1]) << 8) |\n ((uint64_t)(p[2]) << 16) | ((uint64_t)(p[3]) << 24) |\n ((uint64_t)(p[4]) << 32) | ((uint64_t)(p[5]) << 40) |\n ((uint64_t)(p[6]) << 48) | ((uint64_t)(p[7]) << 56);\n}\n\n " +
|
||||
"// --------\n\n#define wuffs_base__load_u8be__no_bounds_check \\\n wuffs_base__load_u8__no_bounds_check\n#define wuffs_base__load_u8le__no_bounds_check \\\n wuffs_base__load_u8__no_bounds_check\n\nstatic inline uint8_t //\nwuffs_base__load_u8__no_bounds_check(const uint8_t* p) {\n return p[0];\n}\n\nstatic inline uint16_t //\nwuffs_base__load_u16be__no_bounds_check(const uint8_t* p) {\n return (uint16_t)(((uint16_t)(p[0]) << 8) | ((uint16_t)(p[1]) << 0));\n}\n\nstatic inline uint16_t //\nwuffs_base__load_u16le__no_bounds_check(const uint8_t* p) {\n return (uint16_t)(((uint16_t)(p[0]) << 0) | ((uint16_t)(p[1]) << 8));\n}\n\nstatic inline uint32_t //\nwuffs_base__load_u24be__no_bounds_check(const uint8_t* p) {\n return ((uint32_t)(p[0]) << 16) | ((uint32_t)(p[1]) << 8) |\n ((uint32_t)(p[2]) << 0);\n}\n\nstatic inline uint32_t //\nwuffs_base__load_u24le__no_bounds_check(const uint8_t* p) {\n return ((uint32_t)(p[0]) << 0) | ((uint32_t)(p[1]) << 8) |\n ((uint32_t)(p[2]) << 16);\n}\n\nstatic inline uint32_t //\nwuffs_base" +
|
||||
"__load_u32be__no_bounds_check(const uint8_t* p) {\n return ((uint32_t)(p[0]) << 24) | ((uint32_t)(p[1]) << 16) |\n ((uint32_t)(p[2]) << 8) | ((uint32_t)(p[3]) << 0);\n}\n\nstatic inline uint32_t //\nwuffs_base__load_u32le__no_bounds_check(const uint8_t* p) {\n return ((uint32_t)(p[0]) << 0) | ((uint32_t)(p[1]) << 8) |\n ((uint32_t)(p[2]) << 16) | ((uint32_t)(p[3]) << 24);\n}\n\nstatic inline uint64_t //\nwuffs_base__load_u40be__no_bounds_check(const uint8_t* p) {\n return ((uint64_t)(p[0]) << 32) | ((uint64_t)(p[1]) << 24) |\n ((uint64_t)(p[2]) << 16) | ((uint64_t)(p[3]) << 8) |\n ((uint64_t)(p[4]) << 0);\n}\n\nstatic inline uint64_t //\nwuffs_base__load_u40le__no_bounds_check(const uint8_t* p) {\n return ((uint64_t)(p[0]) << 0) | ((uint64_t)(p[1]) << 8) |\n ((uint64_t)(p[2]) << 16) | ((uint64_t)(p[3]) << 24) |\n ((uint64_t)(p[4]) << 32);\n}\n\nstatic inline uint64_t //\nwuffs_base__load_u48be__no_bounds_check(const uint8_t* p) {\n return ((uint64_t)(p[0]) << 40) | ((uint64_t)(p[" +
|
||||
"1]) << 32) |\n ((uint64_t)(p[2]) << 24) | ((uint64_t)(p[3]) << 16) |\n ((uint64_t)(p[4]) << 8) | ((uint64_t)(p[5]) << 0);\n}\n\nstatic inline uint64_t //\nwuffs_base__load_u48le__no_bounds_check(const uint8_t* p) {\n return ((uint64_t)(p[0]) << 0) | ((uint64_t)(p[1]) << 8) |\n ((uint64_t)(p[2]) << 16) | ((uint64_t)(p[3]) << 24) |\n ((uint64_t)(p[4]) << 32) | ((uint64_t)(p[5]) << 40);\n}\n\nstatic inline uint64_t //\nwuffs_base__load_u56be__no_bounds_check(const uint8_t* p) {\n return ((uint64_t)(p[0]) << 48) | ((uint64_t)(p[1]) << 40) |\n ((uint64_t)(p[2]) << 32) | ((uint64_t)(p[3]) << 24) |\n ((uint64_t)(p[4]) << 16) | ((uint64_t)(p[5]) << 8) |\n ((uint64_t)(p[6]) << 0);\n}\n\nstatic inline uint64_t //\nwuffs_base__load_u56le__no_bounds_check(const uint8_t* p) {\n return ((uint64_t)(p[0]) << 0) | ((uint64_t)(p[1]) << 8) |\n ((uint64_t)(p[2]) << 16) | ((uint64_t)(p[3]) << 24) |\n ((uint64_t)(p[4]) << 32) | ((uint64_t)(p[5]) << 40) |\n ((uint64_t)(p[" +
|
||||
"6]) << 48);\n}\n\nstatic inline uint64_t //\nwuffs_base__load_u64be__no_bounds_check(const uint8_t* p) {\n return ((uint64_t)(p[0]) << 56) | ((uint64_t)(p[1]) << 48) |\n ((uint64_t)(p[2]) << 40) | ((uint64_t)(p[3]) << 32) |\n ((uint64_t)(p[4]) << 24) | ((uint64_t)(p[5]) << 16) |\n ((uint64_t)(p[6]) << 8) | ((uint64_t)(p[7]) << 0);\n}\n\nstatic inline uint64_t //\nwuffs_base__load_u64le__no_bounds_check(const uint8_t* p) {\n return ((uint64_t)(p[0]) << 0) | ((uint64_t)(p[1]) << 8) |\n ((uint64_t)(p[2]) << 16) | ((uint64_t)(p[3]) << 24) |\n ((uint64_t)(p[4]) << 32) | ((uint64_t)(p[5]) << 40) |\n ((uint64_t)(p[6]) << 48) | ((uint64_t)(p[7]) << 56);\n}\n\n " +
|
||||
"" +
|
||||
"// --------\n\n#define wuffs_base__store_u8be__no_bounds_check \\\n wuffs_base__store_u8__no_bounds_check\n#define wuffs_base__store_u8le__no_bounds_check \\\n wuffs_base__store_u8__no_bounds_check\n\nstatic inline void //\nwuffs_base__store_u8__no_bounds_check(uint8_t* p, uint8_t x) {\n p[0] = x;\n}\n\nstatic inline void //\nwuffs_base__store_u16be__no_bounds_check(uint8_t* p, uint16_t x) {\n p[0] = (uint8_t)(x >> 8);\n p[1] = (uint8_t)(x >> 0);\n}\n\nstatic inline void //\nwuffs_base__store_u16le__no_bounds_check(uint8_t* p, uint16_t x) {\n p[0] = (uint8_t)(x >> 0);\n p[1] = (uint8_t)(x >> 8);\n}\n\nstatic inline void //\nwuffs_base__store_u24be__no_bounds_check(uint8_t* p, uint32_t x) {\n p[0] = (uint8_t)(x >> 16);\n p[1] = (uint8_t)(x >> 8);\n p[2] = (uint8_t)(x >> 0);\n}\n\nstatic inline void //\nwuffs_base__store_u24le__no_bounds_check(uint8_t* p, uint32_t x) {\n p[0] = (uint8_t)(x >> 0);\n p[1] = (uint8_t)(x >> 8);\n p[2] = (uint8_t)(x >> 16);\n}\n\nstatic inline void //\nwuffs_base__store_u32be__no_bounds_check(uint8_t* p," +
|
||||
" uint32_t x) {\n p[0] = (uint8_t)(x >> 24);\n p[1] = (uint8_t)(x >> 16);\n p[2] = (uint8_t)(x >> 8);\n p[3] = (uint8_t)(x >> 0);\n}\n\nstatic inline void //\nwuffs_base__store_u32le__no_bounds_check(uint8_t* p, uint32_t x) {\n p[0] = (uint8_t)(x >> 0);\n p[1] = (uint8_t)(x >> 8);\n p[2] = (uint8_t)(x >> 16);\n p[3] = (uint8_t)(x >> 24);\n}\n\nstatic inline void //\nwuffs_base__store_u40be__no_bounds_check(uint8_t* p, uint64_t x) {\n p[0] = (uint8_t)(x >> 32);\n p[1] = (uint8_t)(x >> 24);\n p[2] = (uint8_t)(x >> 16);\n p[3] = (uint8_t)(x >> 8);\n p[4] = (uint8_t)(x >> 0);\n}\n\nstatic inline void //\nwuffs_base__store_u40le__no_bounds_check(uint8_t* p, uint64_t x) {\n p[0] = (uint8_t)(x >> 0);\n p[1] = (uint8_t)(x >> 8);\n p[2] = (uint8_t)(x >> 16);\n p[3] = (uint8_t)(x >> 24);\n p[4] = (uint8_t)(x >> 32);\n}\n\nstatic inline void //\nwuffs_base__store_u48be__no_bounds_check(uint8_t* p, uint64_t x) {\n p[0] = (uint8_t)(x >> 40);\n p[1] = (uint8_t)(x >> 32);\n p[2] = (uint8_t)(x >> 24);\n p[3] = (uint8_t)(x >> 16);\n p[4] " +
|
||||
|
||||
@@ -528,74 +528,74 @@ wuffs_base__count_leading_zeroes_u64(uint64_t u) {
|
||||
wuffs_base__load_u8__no_bounds_check
|
||||
|
||||
static inline uint8_t //
|
||||
wuffs_base__load_u8__no_bounds_check(uint8_t* p) {
|
||||
wuffs_base__load_u8__no_bounds_check(const uint8_t* p) {
|
||||
return p[0];
|
||||
}
|
||||
|
||||
static inline uint16_t //
|
||||
wuffs_base__load_u16be__no_bounds_check(uint8_t* p) {
|
||||
wuffs_base__load_u16be__no_bounds_check(const uint8_t* p) {
|
||||
return (uint16_t)(((uint16_t)(p[0]) << 8) | ((uint16_t)(p[1]) << 0));
|
||||
}
|
||||
|
||||
static inline uint16_t //
|
||||
wuffs_base__load_u16le__no_bounds_check(uint8_t* p) {
|
||||
wuffs_base__load_u16le__no_bounds_check(const uint8_t* p) {
|
||||
return (uint16_t)(((uint16_t)(p[0]) << 0) | ((uint16_t)(p[1]) << 8));
|
||||
}
|
||||
|
||||
static inline uint32_t //
|
||||
wuffs_base__load_u24be__no_bounds_check(uint8_t* p) {
|
||||
wuffs_base__load_u24be__no_bounds_check(const uint8_t* p) {
|
||||
return ((uint32_t)(p[0]) << 16) | ((uint32_t)(p[1]) << 8) |
|
||||
((uint32_t)(p[2]) << 0);
|
||||
}
|
||||
|
||||
static inline uint32_t //
|
||||
wuffs_base__load_u24le__no_bounds_check(uint8_t* p) {
|
||||
wuffs_base__load_u24le__no_bounds_check(const uint8_t* p) {
|
||||
return ((uint32_t)(p[0]) << 0) | ((uint32_t)(p[1]) << 8) |
|
||||
((uint32_t)(p[2]) << 16);
|
||||
}
|
||||
|
||||
static inline uint32_t //
|
||||
wuffs_base__load_u32be__no_bounds_check(uint8_t* p) {
|
||||
wuffs_base__load_u32be__no_bounds_check(const uint8_t* p) {
|
||||
return ((uint32_t)(p[0]) << 24) | ((uint32_t)(p[1]) << 16) |
|
||||
((uint32_t)(p[2]) << 8) | ((uint32_t)(p[3]) << 0);
|
||||
}
|
||||
|
||||
static inline uint32_t //
|
||||
wuffs_base__load_u32le__no_bounds_check(uint8_t* p) {
|
||||
wuffs_base__load_u32le__no_bounds_check(const uint8_t* p) {
|
||||
return ((uint32_t)(p[0]) << 0) | ((uint32_t)(p[1]) << 8) |
|
||||
((uint32_t)(p[2]) << 16) | ((uint32_t)(p[3]) << 24);
|
||||
}
|
||||
|
||||
static inline uint64_t //
|
||||
wuffs_base__load_u40be__no_bounds_check(uint8_t* p) {
|
||||
wuffs_base__load_u40be__no_bounds_check(const uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 32) | ((uint64_t)(p[1]) << 24) |
|
||||
((uint64_t)(p[2]) << 16) | ((uint64_t)(p[3]) << 8) |
|
||||
((uint64_t)(p[4]) << 0);
|
||||
}
|
||||
|
||||
static inline uint64_t //
|
||||
wuffs_base__load_u40le__no_bounds_check(uint8_t* p) {
|
||||
wuffs_base__load_u40le__no_bounds_check(const uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 0) | ((uint64_t)(p[1]) << 8) |
|
||||
((uint64_t)(p[2]) << 16) | ((uint64_t)(p[3]) << 24) |
|
||||
((uint64_t)(p[4]) << 32);
|
||||
}
|
||||
|
||||
static inline uint64_t //
|
||||
wuffs_base__load_u48be__no_bounds_check(uint8_t* p) {
|
||||
wuffs_base__load_u48be__no_bounds_check(const uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 40) | ((uint64_t)(p[1]) << 32) |
|
||||
((uint64_t)(p[2]) << 24) | ((uint64_t)(p[3]) << 16) |
|
||||
((uint64_t)(p[4]) << 8) | ((uint64_t)(p[5]) << 0);
|
||||
}
|
||||
|
||||
static inline uint64_t //
|
||||
wuffs_base__load_u48le__no_bounds_check(uint8_t* p) {
|
||||
wuffs_base__load_u48le__no_bounds_check(const uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 0) | ((uint64_t)(p[1]) << 8) |
|
||||
((uint64_t)(p[2]) << 16) | ((uint64_t)(p[3]) << 24) |
|
||||
((uint64_t)(p[4]) << 32) | ((uint64_t)(p[5]) << 40);
|
||||
}
|
||||
|
||||
static inline uint64_t //
|
||||
wuffs_base__load_u56be__no_bounds_check(uint8_t* p) {
|
||||
wuffs_base__load_u56be__no_bounds_check(const uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 48) | ((uint64_t)(p[1]) << 40) |
|
||||
((uint64_t)(p[2]) << 32) | ((uint64_t)(p[3]) << 24) |
|
||||
((uint64_t)(p[4]) << 16) | ((uint64_t)(p[5]) << 8) |
|
||||
@@ -603,7 +603,7 @@ wuffs_base__load_u56be__no_bounds_check(uint8_t* p) {
|
||||
}
|
||||
|
||||
static inline uint64_t //
|
||||
wuffs_base__load_u56le__no_bounds_check(uint8_t* p) {
|
||||
wuffs_base__load_u56le__no_bounds_check(const uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 0) | ((uint64_t)(p[1]) << 8) |
|
||||
((uint64_t)(p[2]) << 16) | ((uint64_t)(p[3]) << 24) |
|
||||
((uint64_t)(p[4]) << 32) | ((uint64_t)(p[5]) << 40) |
|
||||
@@ -611,7 +611,7 @@ wuffs_base__load_u56le__no_bounds_check(uint8_t* p) {
|
||||
}
|
||||
|
||||
static inline uint64_t //
|
||||
wuffs_base__load_u64be__no_bounds_check(uint8_t* p) {
|
||||
wuffs_base__load_u64be__no_bounds_check(const uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 56) | ((uint64_t)(p[1]) << 48) |
|
||||
((uint64_t)(p[2]) << 40) | ((uint64_t)(p[3]) << 32) |
|
||||
((uint64_t)(p[4]) << 24) | ((uint64_t)(p[5]) << 16) |
|
||||
@@ -619,7 +619,7 @@ wuffs_base__load_u64be__no_bounds_check(uint8_t* p) {
|
||||
}
|
||||
|
||||
static inline uint64_t //
|
||||
wuffs_base__load_u64le__no_bounds_check(uint8_t* p) {
|
||||
wuffs_base__load_u64le__no_bounds_check(const uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 0) | ((uint64_t)(p[1]) << 8) |
|
||||
((uint64_t)(p[2]) << 16) | ((uint64_t)(p[3]) << 24) |
|
||||
((uint64_t)(p[4]) << 32) | ((uint64_t)(p[5]) << 40) |
|
||||
|
||||
Reference in new issue
Block a user