summaryrefslogtreecommitdiffstats
path: root/Vector.c
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2020-10-21 21:25:59 +0200
committerBenBE <BenBE@geshi.org>2020-11-17 02:01:02 +0100
commit7914ec201ef19fa0c0caed99dc150a953eb9bc19 (patch)
tree80849aa9cf7f0779c8a5816af0132533816bec74 /Vector.c
parent15eab2012d2100e1ddd20c186db23a8172b5858d (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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Vector.c b/Vector.c
index 09d1612e..721ebdd3 100644
--- a/Vector.c
+++ b/Vector.c
@@ -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;
}

© 2014-2024 Faster IT GmbH | imprint | privacy policy