forked from WeAreMuffin/c_vector
-
Notifications
You must be signed in to change notification settings - Fork 0
/
c_vector_capacity.c
29 lines (25 loc) · 1.12 KB
/
c_vector_capacity.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* c_vector_capacity.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: aleger <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2014/02/13 16:15:00 by aleger #+# #+# */
/* Updated: 2014/02/13 22:35:25 by aleger ### ########.fr */
/* */
/* ************************************************************************** */
#include "c_vector.h"
#include <stdlib.h>
size_t vector_size(t_vector *self)
{
return (self->count);
}
size_t vector_capacity(t_vector *self)
{
return (self->capacity);
}
int vector_is_empty(t_vector *self)
{
return (self->count == 0);
}