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. --- tools/gfx/renderer-shared.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'tools/gfx/renderer-shared.cpp') diff --git a/tools/gfx/renderer-shared.cpp b/tools/gfx/renderer-shared.cpp index 445f22e5a..c32cc3d90 100644 --- a/tools/gfx/renderer-shared.cpp +++ b/tools/gfx/renderer-shared.cpp @@ -715,10 +715,10 @@ Result RendererBase::getShaderObjectLayout( slang::TypeLayoutReflection* typeLayout, ShaderObjectLayoutBase** outLayout) { RefPtr shaderObjectLayout; - if (!m_shaderObjectLayoutCache.TryGetValue(typeLayout, shaderObjectLayout)) + if (!m_shaderObjectLayoutCache.tryGetValue(typeLayout, shaderObjectLayout)) { SLANG_RETURN_ON_FAIL(createShaderObjectLayout(typeLayout, shaderObjectLayout.writeRef())); - m_shaderObjectLayoutCache.Add(typeLayout, shaderObjectLayout); + m_shaderObjectLayoutCache.add(typeLayout, shaderObjectLayout); } *outLayout = shaderObjectLayout.detach(); return SLANG_OK; @@ -803,13 +803,13 @@ ShaderComponentID ShaderCache::getComponentId(UnownedStringSlice name) ShaderComponentID ShaderCache::getComponentId(ComponentKey key) { ShaderComponentID componentId = 0; - if (componentIds.TryGetValue(key, componentId)) + if (componentIds.tryGetValue(key, componentId)) return componentId; OwningComponentKey owningTypeKey; owningTypeKey.hash = key.hash; owningTypeKey.typeName = key.typeName; owningTypeKey.specializationArgs.addRange(key.specializationArgs); - ShaderComponentID resultId = static_cast(componentIds.Count()); + ShaderComponentID resultId = static_cast(componentIds.getCount()); componentIds[owningTypeKey] = resultId; return resultId; } @@ -1187,20 +1187,20 @@ Result ShaderObjectBase::copyFrom(IShaderObject* object, ITransientResourceHeap* for (auto& kv : srcObj->m_objects) { ComPtr subObject; - SLANG_RETURN_ON_FAIL(kv.Value->getCurrentVersion(transientHeap, subObject.writeRef())); - setObject(kv.Key, subObject); + SLANG_RETURN_ON_FAIL(kv.value->getCurrentVersion(transientHeap, subObject.writeRef())); + setObject(kv.key, subObject); } for (auto& kv : srcObj->m_resources) { - setResource(kv.Key, kv.Value.Ptr()); + setResource(kv.key, kv.value.Ptr()); } for (auto& kv : srcObj->m_samplers) { - setSampler(kv.Key, kv.Value.Ptr()); + setSampler(kv.key, kv.value.Ptr()); } for (auto& kv : srcObj->m_specializationArgs) { - setSpecializationArgs(kv.Key, kv.Value.begin(), (uint32_t)kv.Value.getCount()); + setSpecializationArgs(kv.key, kv.value.begin(), (uint32_t)kv.value.getCount()); } return SLANG_OK; } -- cgit v1.2.3