mirror of
https://github.com/thepigeongenerator/mcaselector-lite.git
synced 2025-12-16 23:35:46 +01:00
fix: use uintptr over usize in locations where applicable
This commit is contained in:
@@ -74,7 +74,7 @@ static int mcx_loadchunk(const u8 *restrict buf, const i32 *restrict table, int
|
|||||||
/* Moves chunks `src_s` to `src_e` (inclusive) from `src`, back onto `dst`. */
|
/* Moves chunks `src_s` to `src_e` (inclusive) from `src`, back onto `dst`. */
|
||||||
static void mvchunks(u8 *dst, u8 *src, u32 *restrict table, int src_s, int src_e) {
|
static void mvchunks(u8 *dst, u8 *src, u32 *restrict table, int src_s, int src_e) {
|
||||||
assert(src > dst);
|
assert(src > dst);
|
||||||
usize len = src - dst; // acquire the amount of bytes that we shall move
|
uintptr len = src - dst; // acquire the amount of bytes that we shall move
|
||||||
assert(!(len % SECTOR));
|
assert(!(len % SECTOR));
|
||||||
|
|
||||||
// count how many bytes we need to move, whilst updating location data
|
// count how many bytes we need to move, whilst updating location data
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ int main(void) {
|
|||||||
assert_true(sizeof(u64) == 8);
|
assert_true(sizeof(u64) == 8);
|
||||||
assert_true(sizeof(f32) == 4);
|
assert_true(sizeof(f32) == 4);
|
||||||
assert_true(sizeof(f64) == 8);
|
assert_true(sizeof(f64) == 8);
|
||||||
assert_true(sizeof(size_t) == sizeof(intptr_t));
|
assert_true(sizeof(usize) == sizeof(size_t));
|
||||||
test_conf_procbuf("key=val", "key", "val", 0);
|
test_conf_procbuf("key=val", "key", "val", 0);
|
||||||
test_conf_procbuf("sometxt", "sometxt", "", CONF_ESYNTAX);
|
test_conf_procbuf("sometxt", "sometxt", "", CONF_ESYNTAX);
|
||||||
test_conf_procbuf("# comment", "", "", CONF_ENODAT);
|
test_conf_procbuf("# comment", "", "", CONF_ENODAT);
|
||||||
|
|||||||
Reference in New Issue
Block a user