Rename DEBUG macro to LOG
DEBUG is already used as the symbol to enable/disable assert() calls
This commit is contained in:
parent
8d1b9501ab
commit
7aba2a0716
4 changed files with 53 additions and 52 deletions
|
|
@ -34,7 +34,7 @@ static inline void *vector_get(Vector *self, size_t index) {
|
|||
return (void *)((char *)self->contents + index * self->element_size);
|
||||
}
|
||||
|
||||
static inline void *vector_back(Vector *self) {
|
||||
static inline void *vector_back(Vector *self) {
|
||||
assert(self->size > 0);
|
||||
return vector_get(self, self->size - 1);
|
||||
}
|
||||
|
|
@ -81,7 +81,7 @@ static inline void vector_reverse(Vector *self) {
|
|||
static inline Vector vector_copy(Vector *self) {
|
||||
Vector copy = *self;
|
||||
copy.contents = memcpy(malloc(self->capacity * self->element_size),
|
||||
self->contents, self->size * self->element_size);
|
||||
self->contents, self->size * self->element_size);
|
||||
return copy;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue