From d1f997bd9609fe6c112593e15f9f920175367a88 Mon Sep 17 00:00:00 2001 From: Garrett Smith Date: Tue, 26 May 2026 22:14:46 -0700 Subject: [PATCH] use std::sort rather than std::ranges::sort --- src/main.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 242bcbf..669c4a1 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -204,7 +204,9 @@ void dump_context(const N64Recomp::Context& context, const std::unordered_mapsecond) { sorted_symbols.push_back(cur_sym); } - std::ranges::sort(sorted_symbols, {}, [](const N64Recomp::DataSymbol& sym) { return std::tie(sym.vram, sym.name); }); + std::sort(sorted_symbols.begin(), sorted_symbols.end(), [](auto& a, auto& b) { + return std::tie(a.get().vram, a.get().name) < std::tie(b.get().vram, b.get().name); + }); fmt::print(data_context_file, "symbols = [\n"); for (const N64Recomp::DataSymbol& cur_sym : sorted_symbols) { @@ -257,7 +263,9 @@ void dump_context(const N64Recomp::Context& context, const std::unordered_mapsecond) { sorted_symbols.push_back(cur_sym); } - std::ranges::sort(sorted_symbols, {}, [](const N64Recomp::DataSymbol& sym) { return std::tie(sym.vram, sym.name); }); + std::sort(sorted_symbols.begin(), sorted_symbols.end(), [](auto& a, auto& b) { + return std::tie(a.get().vram, a.get().name) < std::tie(b.get().vram, b.get().name); + }); fmt::print(data_context_file, "symbols = [\n"); for (const N64Recomp::DataSymbol& cur_sym : sorted_symbols) {