TreeMap: fix compare function
For descending sorting, TreeMapItemLessThan implemented <=, not <. qSort obviously has no problem with that, but in preparation of replacing the obsolete qSort with std::sort, we need to fix it, because it otherwise it can crash (actually observed!). std::sort is known to be sensitive to non-strictly ordering compare functions, eventually resulting in out-of-bounds accesses.
parent
b80aeb81
Please register or sign in to comment