base: Make AddrRangeMap able to return non-const iterators.
The erase() method only accepts regular iterators which is consistent
with the normal STL map, but the existing find() only returns const
iterators. The STL container can return either depending on if "this"
Unfortunately there isn't a great way to have only one find
implementation which returns the right type of iterator under the right
conditions. Also, it's not possible to turn a const_iterator into an
iterator, but it is possible to go the other way. This change
duplicates very short functions which return iterators, and for find
does the only thing I could find which avoids having to copy that
whole large function.
Reviewed-by: Daniel Carvalho <firstname.lastname@example.org>
Reviewed-by: Nikos Nikoleris <email@example.com>
Reviewed-by: Andreas Sandberg <firstname.lastname@example.org>
Maintainer: Andreas Sandberg <email@example.com>
1 file changed