From 2f53b2174040eb0bc84fce8799b7a9be630eabd5 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Mon, 25 Oct 2021 22:34:12 -0400 Subject: [PATCH] Stop trying to make happen, it's not going to happen --- lib/DirectoryEnumerator.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/DirectoryEnumerator.cpp b/lib/DirectoryEnumerator.cpp index 04fb6ae..3983b8f 100644 --- a/lib/DirectoryEnumerator.cpp +++ b/lib/DirectoryEnumerator.cpp @@ -5,7 +5,6 @@ #define WIN32_LEAN_AND_MEAN #endif #include -#include #else #include #include @@ -83,8 +82,8 @@ DirectoryEnumerator::DirectoryEnumerator(std::string_view path, Mode mode, bool m_entries.reserve(sort.size()); if (reverse) { - for (auto& it : std::ranges::reverse_view(sort)) { - m_entries.emplace_back(std::move(it.second)); + for (auto it = sort.crbegin(); it != sort.crend(); ++it) { + m_entries.emplace_back(std::move(it->second)); } } else { for (auto& e : sort) { @@ -125,8 +124,8 @@ DirectoryEnumerator::DirectoryEnumerator(std::string_view path, Mode mode, bool m_entries.reserve(m_entries.size() + sort.size()); if (reverse) { - for (auto& it : std::ranges::reverse_view(sort)) { - m_entries.emplace_back(std::move(it.second)); + for (auto it = sort.crbegin(); it != sort.crend(); ++it) { + m_entries.emplace_back(std::move(it->second)); } } else { for (auto& e : sort) { @@ -155,8 +154,8 @@ DirectoryEnumerator::DirectoryEnumerator(std::string_view path, Mode mode, bool m_entries.reserve(m_entries.size() + sort.size()); if (reverse) { - for (auto& e : std::ranges::reverse_view(sort)) { - m_entries.emplace_back(std::move(e.second)); + for (auto it = sort.crbegin(); it != sort.crend(); ++it) { + m_entries.emplace_back(std::move(it->second)); } } else { for (auto& e : sort) {