summaryrefslogtreecommitdiffstats
path: root/configure.cmake
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2020-08-17 17:38:41 +0200
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2020-08-19 01:45:25 +0200
commit8191a19df45007eec5259b0f865d3f823da75a50 (patch)
treee9c3475d377c2d296e38113411a26217a57f1496 /configure.cmake
parent2ba1d540e6175d06c21be86614704f9e56eb5d96 (diff)
QMultiMap: fix regression in find(Key, T)
1) Implementing the const version in terms of the non-const version exposes to accidental detaches. Avoid that. 2) The non-const version has to detach, just like find(Key), or doing a comparison like find(Key, T) != end() might report a wrong result. 3) Properly check if the value was found by checking find_if's return value (against its second parameter, the end of the iterated range). If the value was NOT found, then return the map's end() (again because clients of find() will check against end()). Change-Id: I03533e89f1e7a52ad888d159d78f38002765953c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'configure.cmake')
0 files changed, 0 insertions, 0 deletions