mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 00:14:32 -08:00
[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:
@@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user