chore: readable vec_pop

This commit is contained in:
javalsai 2024-11-01 13:28:32 +01:00
parent 06fa419a6c
commit b8caf5b7d7
Signed by: javalsai
SSH Key Fingerprint: SHA256:3G83yKhBUWVABVX/vPWH88xnK4+ptMtHkZGCRXD4Mk8

View File

@ -116,8 +116,7 @@ void* vec_pop(struct Vector* vec) {
if (vec->length == 0) if (vec->length == 0)
return NULL; return NULL;
vec->length--; return vec->pages[--vec->length];
return vec->pages[vec->length];
} }
void* vec_get(struct Vector* vec, uint32_t index) { void* vec_get(struct Vector* vec, uint32_t index) {