[kutil] Update map iteration

Add an iterator type to kutil::map, and allow for each loops. Also
unify the compare() signature expected by sorting containers, and fixes
to adding and sorting in kutil::vector.
This commit is contained in:
2020-09-15 00:21:28 -07:00
parent e8564c755b
commit dcb4d1823f
6 changed files with 61 additions and 18 deletions

View File

@@ -6,8 +6,8 @@ struct unsortableT {
struct sortableT {
int value;
int compare(const sortableT *other) const {
return value - other->value;
int compare(const sortableT &other) const {
return value - other.value;
}
};