From 5866513c532114654c1a0e616be3c64ef0aa92ed Mon Sep 17 00:00:00 2001 From: jacqueline Date: Fri, 16 Feb 2024 15:13:58 +1100 Subject: Move the list of unexplored files into spiram --- src/database/file_gatherer.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/database/file_gatherer.cpp') diff --git a/src/database/file_gatherer.cpp b/src/database/file_gatherer.cpp index dde363bd..b7b7271e 100644 --- a/src/database/file_gatherer.cpp +++ b/src/database/file_gatherer.cpp @@ -22,12 +22,12 @@ static_assert(sizeof(TCHAR) == sizeof(char), "TCHAR must be CHAR"); auto FileGathererImpl::FindFiles( const std::string& root, - std::function cb) -> void { - std::deque to_explore; - to_explore.push_back(root); + std::function cb) -> void { + std::pmr::deque to_explore{&memory::kSpiRamResource}; + to_explore.push_back({root.data(), root.size()}); while (!to_explore.empty()) { - std::string next_path_str = to_explore.front(); + auto next_path_str = to_explore.front(); to_explore.pop_front(); const TCHAR* next_path = static_cast(next_path_str.c_str()); @@ -56,7 +56,7 @@ auto FileGathererImpl::FindFiles( // System or hidden file. Ignore it and move on. continue; } else { - std::string full_path; + std::pmr::string full_path{&memory::kSpiRamResource}; full_path += next_path_str; full_path += "/"; full_path += info.fname; -- cgit v1.2.3