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/slang/slang-serialize-container.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source/slang/slang-serialize-container.cpp') diff --git a/source/slang/slang-serialize-container.cpp b/source/slang/slang-serialize-container.cpp index 09aea6c8b..3eea5caf7 100644 --- a/source/slang/slang-serialize-container.cpp +++ b/source/slang/slang-serialize-container.cpp @@ -292,10 +292,10 @@ static List& _getCandidateExtensionList( Dictionary>& mapTypeToCandidateExtensions) { RefPtr entry; - if (!mapTypeToCandidateExtensions.TryGetValue(typeDecl, entry)) + if (!mapTypeToCandidateExtensions.tryGetValue(typeDecl, entry)) { entry = new CandidateExtensionList(); - mapTypeToCandidateExtensions.Add(typeDecl, entry); + mapTypeToCandidateExtensions.add(typeDecl, entry); } return entry->candidateExtensions; } @@ -537,20 +537,20 @@ static List& _getCandidateExtensionList( else if (SyntaxDecl* syntaxDecl = dynamicCast(nodeBase)) { // Set up the dictionary lazily - if (syntaxKeywordDict.Count() == 0) + if (syntaxKeywordDict.getCount() == 0) { NamePool* namePool = options.session->getNamePool(); for (Index i = 0; i < syntaxParseInfos.getCount(); ++i) { const auto& entry = syntaxParseInfos[i]; - syntaxKeywordDict.Add(namePool->getName(entry.keywordName), i); + syntaxKeywordDict.add(namePool->getName(entry.keywordName), i); } // Must have something in it at this point - SLANG_ASSERT(syntaxKeywordDict.Count()); + SLANG_ASSERT(syntaxKeywordDict.getCount()); } // Look up the index - Index* entryIndexPtr = syntaxKeywordDict.TryGetValue(syntaxDecl->getName()); + Index* entryIndexPtr = syntaxKeywordDict.tryGetValue(syntaxDecl->getName()); if (entryIndexPtr) { // Set up SyntaxDecl based on the ParseSyntaxIndo -- cgit v1.2.3