Fix compiler warnings
Two small commits, after which the build compiles cleanly on my setup. Commit messages copied below for convenience.
Fix compiler warning by using an STL-style iterator instead
It didn't like assigning .key() from it.next() which is a temporary.
Fix signedness mismatch compiler warning
Using the same (unsigned) type of ResultList::size(), with an "invalid" original value of its maximum assignable value, we can fix the warning without introducing more code complexity.