diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2023-04-25 10:43:29 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-25 10:43:29 -0400 |
| commit | 7b7c095b37e85ca3a8f55eff1c3d9643d467b8e0 (patch) | |
| tree | 9c71955dbc956b0058b19818ca127c8132cda512 /tools/gfx/renderer-shared.cpp | |
| parent | 284cee1f246c072f190c87c8fb60c1d2181e458f (diff) | |
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.
Diffstat (limited to 'tools/gfx/renderer-shared.cpp')
| -rw-r--r-- | tools/gfx/renderer-shared.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
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<ShaderObjectLayoutBase> 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<ShaderComponentID>(componentIds.Count()); + ShaderComponentID resultId = static_cast<ShaderComponentID>(componentIds.getCount()); componentIds[owningTypeKey] = resultId; return resultId; } @@ -1187,20 +1187,20 @@ Result ShaderObjectBase::copyFrom(IShaderObject* object, ITransientResourceHeap* for (auto& kv : srcObj->m_objects) { ComPtr<IShaderObject> 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; } |
