diff options
| author | jacqueline <me@jacqueline.id.au> | 2024-02-29 12:10:44 +1100 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2024-02-29 12:10:44 +1100 |
| commit | 7d3ddac0eaea207aee187729e3beec95d8d201dc (patch) | |
| tree | 4b4545e725697663a4768630c48f49e8bbb8cf59 /src/database/file_gatherer.cpp | |
| parent | d41f9f703375171d5766840c9edec32ff47bb25d (diff) | |
| parent | 9fca08f8434a05e1fe93a1c4f8133f0e7fc118bf (diff) | |
| download | tangara-fw-7d3ddac0eaea207aee187729e3beec95d8d201dc.tar.gz | |
Merge branch 'main' into seek-support
Diffstat (limited to 'src/database/file_gatherer.cpp')
| -rw-r--r-- | src/database/file_gatherer.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
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<void(const std::string&, const FILINFO&)> cb) -> void { - std::deque<std::string> to_explore; - to_explore.push_back(root); + std::function<void(std::string_view, const FILINFO&)> cb) -> void { + std::pmr::deque<std::pmr::string> 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<const TCHAR*>(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; |
