diff options
| author | leiyu3 <s444814187@gmail.com> | 2022-09-22 13:55:23 -0400 |
|---|---|---|
| committer | leiyu3 <s444814187@gmail.com> | 2022-09-22 13:55:23 -0400 |
| commit | fbd77b8897ba5d08f017d21c5ca60041c468e2c1 (patch) | |
| tree | 1e5435ef7b4962c2fdd02589a2db58b7165ffc86 /libvector.c | |
| parent | aa784eaece4425c6145419ea9d1baa5da51a3cc6 (diff) | |
| download | vector_c-fbd77b8897ba5d08f017d21c5ca60041c468e2c1.tar.gz vector_c-fbd77b8897ba5d08f017d21c5ca60041c468e2c1.zip | |
remove is_full
no longer need sice vector can resize
Diffstat (limited to 'libvector.c')
| -rw-r--r-- | libvector.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/libvector.c b/libvector.c index f099e34..29abc9d 100644 --- a/libvector.c +++ b/libvector.c | |||
| @@ -25,13 +25,6 @@ int is_empty(vector_t vec){ | |||
| 25 | return 0; | 25 | return 0; |
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | int is_full(vector_t vec){ | ||
| 29 | if (vec.cur_size >= vec.max_size){ | ||
| 30 | return 1; | ||
| 31 | } | ||
| 32 | return 0; | ||
| 33 | } | ||
| 34 | |||
| 35 | int at(vector_t vec, int index){ | 28 | int at(vector_t vec, int index){ |
| 36 | if (index >= size(vec) || index < 0){ | 29 | if (index >= size(vec) || index < 0){ |
| 37 | printf("Index out of bound!!\n"); | 30 | printf("Index out of bound!!\n"); |
