From 7b7c095b37e85ca3a8f55eff1c3d9643d467b8e0 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Tue, 25 Apr 2023 10:43:29 -0400 Subject: Dictionary using lowerCamel (#2835) * #include an absolute path didn't work - because paths were taken to always be relative. * WIP lowerCamel Dictionary. * WIP more lowerCamel fixes for Dictionary. * Add/Remove/Clear * GetValue/Contains * Fix tabs in dictionary. Count -> getCount * Fix fields with caps. * Key -> key Value -> value Use m_ for members where appropriate. Use lowerCamel in linked list. * Some small fixes/improvements to Dictionary. * Kick CI. --- source/core/slang-memory-file-system.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source/core/slang-memory-file-system.cpp') diff --git a/source/core/slang-memory-file-system.cpp b/source/core/slang-memory-file-system.cpp index a6bc05f24..eabd13072 100644 --- a/source/core/slang-memory-file-system.cpp +++ b/source/core/slang-memory-file-system.cpp @@ -55,7 +55,7 @@ MemoryFileSystem::Entry* MemoryFileSystem::_getEntryFromCanonicalPath(const Stri } else { - return m_entries.TryGetValue(canonicalPath); + return m_entries.tryGetValue(canonicalPath); } } @@ -173,7 +173,7 @@ SlangResult MemoryFileSystem::enumeratePathContents(const char* path, FileSystem // If it is a directory, we need to see if there is anything in it for (const auto& pair : m_entries) { - const Entry* childEntry = &pair.Value; + const Entry* childEntry = &pair.value; collector.addPath(childEntry->m_type, childEntry->m_canonicalPath.getUnownedSlice()); } @@ -250,7 +250,7 @@ SlangResult MemoryFileSystem::_requireFile(const char* path, Entry** outEntry) { Entry entry; entry.initFile(canonicalPath); - m_entries.Add(canonicalPath, entry); + m_entries.add(canonicalPath, entry); foundEntry = _getEntryFromCanonicalPath(canonicalPath); } @@ -277,7 +277,7 @@ SlangResult MemoryFileSystem::remove(const char* path) // If it is a directory, we need to see if there is anything in it for (const auto& pair : m_entries) { - const Entry* childEntry = &pair.Value; + const Entry* childEntry = &pair.value; collector.addPath(childEntry->m_type, childEntry->m_canonicalPath.getUnownedSlice()); if (collector.hasContent()) { @@ -289,7 +289,7 @@ SlangResult MemoryFileSystem::remove(const char* path) // Reset so doesn't hold references/keep memory in scope entry->reset(); - m_entries.Remove(canonicalPath); + m_entries.remove(canonicalPath); return SLANG_OK; } @@ -308,7 +308,7 @@ SlangResult MemoryFileSystem::createDirectory(const char* path) Entry entry; entry.initDirectory(canonicalPath); - m_entries.Add(canonicalPath, entry); + m_entries.add(canonicalPath, entry); return SLANG_OK; } -- cgit v1.2.3