Use std::tie for sort comparator functions

This commit is contained in:
Rangi42
2025-07-13 14:47:10 -04:00
parent 21a6d35b8b
commit 2adeda0318
3 changed files with 16 additions and 32 deletions

View File

@@ -75,6 +75,7 @@ void sortRgb(std::vector<Palette> &palettes) {
options.verbosePrint(Options::VERB_LOG_ACT, "Sorting palettes by luminance...\n");
for (Palette &pal : palettes) {
// Sort from lightest to darkest
std::sort(RANGE(pal), [](uint16_t lhs, uint16_t rhs) {
return luminance(lhs) > luminance(rhs);
});