mirror of
https://github.com/javalsai/lidm.git
synced 2025-07-03 22:38:41 +02:00
chore: readable vec_pop
This commit is contained in:
parent
06fa419a6c
commit
b8caf5b7d7
@ -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) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user