diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2020-10-21 21:25:59 +0200 |
---|---|---|
committer | BenBE <BenBE@geshi.org> | 2020-11-17 02:01:02 +0100 |
commit | 7914ec201ef19fa0c0caed99dc150a953eb9bc19 (patch) | |
tree | 80849aa9cf7f0779c8a5816af0132533816bec74 /Vector.c | |
parent | 15eab2012d2100e1ddd20c186db23a8172b5858d (diff) |
Hashtable update
- use consistent type for key by introducing a new typedef
- use unsigned types for sizes
- name parameters in foreach function typedef
Diffstat (limited to 'Vector.c')
-rw-r--r-- | Vector.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -60,14 +60,14 @@ static bool Vector_isConsistent(const Vector* this) { } } -int Vector_count(const Vector* this) { - int items = 0; +unsigned int Vector_count(const Vector* this) { + unsigned int items = 0; for (int i = 0; i < this->items; i++) { if (this->array[i]) { items++; } } - assert(items == this->items); + assert(items == (unsigned int)this->items); return items; } |