summaryrefslogtreecommitdiffstats
path: root/source/core/slang-memory-file-system.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/core/slang-memory-file-system.cpp')
-rw-r--r--source/core/slang-memory-file-system.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/source/core/slang-memory-file-system.cpp b/source/core/slang-memory-file-system.cpp
index eabd13072..b24abc20b 100644
--- a/source/core/slang-memory-file-system.cpp
+++ b/source/core/slang-memory-file-system.cpp
@@ -171,10 +171,9 @@ SlangResult MemoryFileSystem::enumeratePathContents(const char* path, FileSystem
ImplicitDirectoryCollector collector(canonicalPath, true);
// If it is a directory, we need to see if there is anything in it
- for (const auto& pair : m_entries)
+ for (const auto& [_, childEntry] : m_entries)
{
- const Entry* childEntry = &pair.value;
- collector.addPath(childEntry->m_type, childEntry->m_canonicalPath.getUnownedSlice());
+ collector.addPath(childEntry.m_type, childEntry.m_canonicalPath.getUnownedSlice());
}
return collector.enumerate(callback, userData);
@@ -275,10 +274,9 @@ SlangResult MemoryFileSystem::remove(const char* path)
ImplicitDirectoryCollector collector(canonicalPath);
// If it is a directory, we need to see if there is anything in it
- for (const auto& pair : m_entries)
+ for (const auto& [_, childEntry] : m_entries)
{
- const Entry* childEntry = &pair.value;
- collector.addPath(childEntry->m_type, childEntry->m_canonicalPath.getUnownedSlice());
+ collector.addPath(childEntry.m_type, childEntry.m_canonicalPath.getUnownedSlice());
if (collector.hasContent())
{
// Directory is not empty