From 87779f3edfc8db968b5ba69e211c35fbf5260ea4 Mon Sep 17 00:00:00 2001 From: scarf Date: Thu, 7 Dec 2023 04:11:20 +0900 Subject: [PATCH] fix: starting item sorting differently on mac (#3814) fix: use `std::stable_sort` --- src/profession.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/profession.cpp b/src/profession.cpp index e156f6038f34..a9697f73575a 100644 --- a/src/profession.cpp +++ b/src/profession.cpp @@ -464,9 +464,8 @@ std::vector> profession::items( bool male, } } - std::sort( result.begin(), - result.end(), []( detached_ptr &first, - detached_ptr &second ) { + std::stable_sort( result.begin(), result.end(), + []( const detached_ptr &first, const detached_ptr &second ) { return first->get_layer() < second->get_layer(); } ); return result;