summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2023-04-25 10:43:29 -0400
committerGitHub <noreply@github.com>2023-04-25 10:43:29 -0400
commit7b7c095b37e85ca3a8f55eff1c3d9643d467b8e0 (patch)
tree9c71955dbc956b0058b19818ca127c8132cda512 /tools
parent284cee1f246c072f190c87c8fb60c1d2181e458f (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')
-rw-r--r--tools/gfx/debug-layer/debug-shader-object.cpp18
-rw-r--r--tools/gfx/mutable-shader-object.h8
-rw-r--r--tools/gfx/renderer-shared.cpp18
-rw-r--r--tools/gfx/renderer-shared.h4
-rw-r--r--tools/gfx/vulkan/vk-device.cpp34
-rw-r--r--tools/gfx/vulkan/vk-pipeline-state.cpp8
-rw-r--r--tools/gfx/vulkan/vk-shader-object-layout.cpp4
-rw-r--r--tools/gfx/vulkan/vk-shader-table.cpp6
-rw-r--r--tools/platform/linux/x11-key-code.cpp2
-rw-r--r--tools/platform/linux/x11-window.cpp22
-rw-r--r--tools/platform/windows/win-window.cpp4
-rw-r--r--tools/slang-cpp-extractor/identifier-lookup.cpp2
-rw-r--r--tools/slang-cpp-extractor/node.cpp6
-rw-r--r--tools/slang-embed/slang-embed.cpp2
-rw-r--r--tools/slang-test/options.cpp8
-rw-r--r--tools/slang-test/slang-test-main.cpp26
-rw-r--r--tools/slang-test/test-context.cpp8
-rw-r--r--tools/slang-test/test-reporter.cpp2
-rw-r--r--tools/slang-unit-test/unit-test-process.cpp2
-rw-r--r--tools/slang-unit-test/unit-test-string.cpp12
-rw-r--r--tools/test-process/test-process-main.cpp2
-rw-r--r--tools/test-server/test-server-main.cpp10
22 files changed, 104 insertions, 104 deletions
diff --git a/tools/gfx/debug-layer/debug-shader-object.cpp b/tools/gfx/debug-layer/debug-shader-object.cpp
index d078ba583..eb67c46ab 100644
--- a/tools/gfx/debug-layer/debug-shader-object.cpp
+++ b/tools/gfx/debug-layer/debug-shader-object.cpp
@@ -26,7 +26,7 @@ void DebugShaderObject::checkCompleteness()
{
if (layout->getBindingRangeBindingCount(i) != 0)
{
- if (!m_initializedBindingRanges.Contains(i))
+ if (!m_initializedBindingRanges.contains(i))
{
auto var = layout->getBindingRangeLeafVariable(i);
GFX_DIAGNOSE_ERROR_FORMAT(
@@ -86,7 +86,7 @@ Result DebugShaderObject::getObject(ShaderOffset const& offset, IShaderObject**
auto resultCode = baseObject->getObject(offset, innerObject.writeRef());
SLANG_RETURN_ON_FAIL(resultCode);
RefPtr<DebugShaderObject> debugShaderObject;
- if (m_objects.TryGetValue(ShaderOffsetKey{offset}, debugShaderObject))
+ if (m_objects.tryGetValue(ShaderOffsetKey{offset}, debugShaderObject))
{
if (debugShaderObject->baseObject == innerObject)
{
@@ -107,7 +107,7 @@ Result DebugShaderObject::setObject(ShaderOffset const& offset, IShaderObject* o
SLANG_GFX_API_FUNC;
auto objectImpl = getDebugObj(object);
m_objects[ShaderOffsetKey{offset}] = objectImpl;
- m_initializedBindingRanges.Add(offset.bindingRangeIndex);
+ m_initializedBindingRanges.add(offset.bindingRangeIndex);
objectImpl->checkCompleteness();
return baseObject->setObject(offset, getInnerObj(object));
}
@@ -117,7 +117,7 @@ Result DebugShaderObject::setResource(ShaderOffset const& offset, IResourceView*
SLANG_GFX_API_FUNC;
auto viewImpl = getDebugObj(resourceView);
m_resources[ShaderOffsetKey{offset}] = viewImpl;
- m_initializedBindingRanges.Add(offset.bindingRangeIndex);
+ m_initializedBindingRanges.add(offset.bindingRangeIndex);
return baseObject->setResource(offset, getInnerObj(resourceView));
}
@@ -126,7 +126,7 @@ Result DebugShaderObject::setSampler(ShaderOffset const& offset, ISamplerState*
SLANG_GFX_API_FUNC;
auto samplerImpl = getDebugObj(sampler);
m_samplers[ShaderOffsetKey{offset}] = samplerImpl;
- m_initializedBindingRanges.Add(offset.bindingRangeIndex);
+ m_initializedBindingRanges.add(offset.bindingRangeIndex);
return baseObject->setSampler(offset, getInnerObj(sampler));
}
@@ -140,7 +140,7 @@ Result DebugShaderObject::setCombinedTextureSampler(
m_samplers[ShaderOffsetKey{offset}] = samplerImpl;
auto viewImpl = getDebugObj(textureView);
m_resources[ShaderOffsetKey{offset}] = viewImpl;
- m_initializedBindingRanges.Add(offset.bindingRangeIndex);
+ m_initializedBindingRanges.add(offset.bindingRangeIndex);
return baseObject->setCombinedTextureSampler(
offset, getInnerObj(viewImpl), getInnerObj(sampler));
}
@@ -198,9 +198,9 @@ Result DebugRootShaderObject::setSpecializationArgs(
void DebugRootShaderObject::reset()
{
m_entryPoints.clear();
- m_objects.Clear();
- m_resources.Clear();
- m_samplers.Clear();
+ m_objects.clear();
+ m_resources.clear();
+ m_samplers.clear();
baseObject.detach();
}
diff --git a/tools/gfx/mutable-shader-object.h b/tools/gfx/mutable-shader-object.h
index 9653986ad..1864be158 100644
--- a/tools/gfx/mutable-shader-object.h
+++ b/tools/gfx/mutable-shader-object.h
@@ -142,7 +142,7 @@ namespace gfx
setObject(ShaderOffset const& offset, IShaderObject* object) override
{
Super::setObject(offset, object);
- m_objectOffsets.Add(offset);
+ m_objectOffsets.add(offset);
markDirty();
return SLANG_OK;
}
@@ -182,9 +182,9 @@ namespace gfx
allocateShaderObject(static_cast<TransientResourceHeapBase*>(transientHeap));
SLANG_RETURN_ON_FAIL(object->setData(ShaderOffset(), this->m_data.getBuffer(), this->m_data.getCount()));
for (auto res : m_resources)
- SLANG_RETURN_ON_FAIL(object->setResource(res.Key, res.Value));
+ SLANG_RETURN_ON_FAIL(object->setResource(res.key, res.value));
for (auto sampler : m_samplers)
- SLANG_RETURN_ON_FAIL(object->setSampler(sampler.Key, sampler.Value));
+ SLANG_RETURN_ON_FAIL(object->setSampler(sampler.key, sampler.value));
for (auto offset : m_objectOffsets)
{
if (offset.bindingRangeIndex < 0)
@@ -304,7 +304,7 @@ namespace gfx
*object = nullptr;
Slang::RefPtr<ShaderObjectBase> subObject;
- if (m_objects.TryGetValue(offset, subObject))
+ if (m_objects.tryGetValue(offset, subObject))
{
returnComPtr(object, subObject);
}
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;
}
diff --git a/tools/gfx/renderer-shared.h b/tools/gfx/renderer-shared.h
index c7137f0fa..38aa775be 100644
--- a/tools/gfx/renderer-shared.h
+++ b/tools/gfx/renderer-shared.h
@@ -1121,7 +1121,7 @@ public:
Slang::RefPtr<PipelineStateBase> getSpecializedPipelineState(PipelineKey programKey)
{
Slang::RefPtr<PipelineStateBase> result;
- if (specializedPipelines.TryGetValue(programKey, result))
+ if (specializedPipelines.tryGetValue(programKey, result))
return result;
return nullptr;
}
@@ -1199,7 +1199,7 @@ public:
TransientResourceHeapBase* transientHeap,
IResourceCommandEncoder* encoder)
{
- if (auto ptr = m_deviceBuffers.TryGetValue(pipeline))
+ if (auto ptr = m_deviceBuffers.tryGetValue(pipeline))
{
return ptr->Ptr();
}
diff --git a/tools/gfx/vulkan/vk-device.cpp b/tools/gfx/vulkan/vk-device.cpp
index 92594f652..b9dbb264f 100644
--- a/tools/gfx/vulkan/vk-device.cpp
+++ b/tools/gfx/vulkan/vk-device.cpp
@@ -608,55 +608,55 @@ Result DeviceImpl::initVulkanInstanceAndDevice(
HashSet<String> extensionNames;
for (const auto& e : extensions)
{
- extensionNames.Add(e.extensionName);
+ extensionNames.add(e.extensionName);
}
- if (extensionNames.Contains("VK_KHR_external_memory"))
+ if (extensionNames.contains("VK_KHR_external_memory"))
{
deviceExtensions.add(VK_KHR_EXTERNAL_MEMORY_EXTENSION_NAME);
#if SLANG_WINDOWS_FAMILY
- if (extensionNames.Contains("VK_KHR_external_memory_win32"))
+ if (extensionNames.contains("VK_KHR_external_memory_win32"))
{
deviceExtensions.add(VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME);
}
#endif
m_features.add("external-memory");
}
- if (extensionNames.Contains(VK_EXT_CONSERVATIVE_RASTERIZATION_EXTENSION_NAME))
+ if (extensionNames.contains(VK_EXT_CONSERVATIVE_RASTERIZATION_EXTENSION_NAME))
{
deviceExtensions.add(VK_EXT_CONSERVATIVE_RASTERIZATION_EXTENSION_NAME);
m_features.add("conservative-rasterization-3");
m_features.add("conservative-rasterization-2");
m_features.add("conservative-rasterization-1");
}
- if (extensionNames.Contains(VK_EXT_DEBUG_REPORT_EXTENSION_NAME))
+ if (extensionNames.contains(VK_EXT_DEBUG_REPORT_EXTENSION_NAME))
{
deviceExtensions.add(VK_EXT_DEBUG_REPORT_EXTENSION_NAME);
- if (extensionNames.Contains(VK_EXT_DEBUG_MARKER_EXTENSION_NAME))
+ if (extensionNames.contains(VK_EXT_DEBUG_MARKER_EXTENSION_NAME))
{
deviceExtensions.add(VK_EXT_DEBUG_MARKER_EXTENSION_NAME);
}
}
- if (extensionNames.Contains(VK_EXT_SHADER_VIEWPORT_INDEX_LAYER_EXTENSION_NAME))
+ if (extensionNames.contains(VK_EXT_SHADER_VIEWPORT_INDEX_LAYER_EXTENSION_NAME))
{
deviceExtensions.add(VK_EXT_SHADER_VIEWPORT_INDEX_LAYER_EXTENSION_NAME);
}
- if (extensionNames.Contains(VK_NVX_BINARY_IMPORT_EXTENSION_NAME))
+ if (extensionNames.contains(VK_NVX_BINARY_IMPORT_EXTENSION_NAME))
{
deviceExtensions.add(VK_NVX_BINARY_IMPORT_EXTENSION_NAME);
m_features.add("nvx-binary-import");
}
- if (extensionNames.Contains(VK_NVX_IMAGE_VIEW_HANDLE_EXTENSION_NAME))
+ if (extensionNames.contains(VK_NVX_IMAGE_VIEW_HANDLE_EXTENSION_NAME))
{
deviceExtensions.add(VK_NVX_IMAGE_VIEW_HANDLE_EXTENSION_NAME);
m_features.add("nvx-image-view-handle");
}
- if (extensionNames.Contains(VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME))
+ if (extensionNames.contains(VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME))
{
deviceExtensions.add(VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME);
m_features.add("push-descriptor");
}
- if (extensionNames.Contains(VK_NV_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME))
+ if (extensionNames.contains(VK_NV_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME))
{
deviceExtensions.add(VK_NV_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME);
m_features.add("barycentrics");
@@ -1759,15 +1759,15 @@ Result DeviceImpl::getFormatSupportedResourceStates(Format format, ResourceState
m_api.vkGetPhysicalDeviceSurfaceFormatsKHR(m_api.m_physicalDevice, VK_NULL_HANDLE, &surfaceFormatCount, surfaceFormats.getBuffer());
for (auto surfaceFormat : surfaceFormats)
{
- presentableFormats.Add(surfaceFormat.format);
+ presentableFormats.add(surfaceFormat.format);
}
#else
// Until we have a solution to query presentable formats without needing a surface,
// hard code presentable formats that is supported by most drivers.
- presentableFormats.Add(VK_FORMAT_R8G8B8A8_UNORM);
- presentableFormats.Add(VK_FORMAT_B8G8R8A8_UNORM);
- presentableFormats.Add(VK_FORMAT_R8G8B8A8_SRGB);
- presentableFormats.Add(VK_FORMAT_B8G8R8A8_SRGB);
+ presentableFormats.add(VK_FORMAT_R8G8B8A8_UNORM);
+ presentableFormats.add(VK_FORMAT_B8G8R8A8_UNORM);
+ presentableFormats.add(VK_FORMAT_R8G8B8A8_SRGB);
+ presentableFormats.add(VK_FORMAT_B8G8R8A8_SRGB);
#endif
ResourceStateSet allowedStates;
@@ -1813,7 +1813,7 @@ Result DeviceImpl::getFormatSupportedResourceStates(Format format, ResourceState
allowedStates.add(ResourceState::DepthWrite);
}
// Present
- if (presentableFormats.Contains(vkFormat))
+ if (presentableFormats.contains(vkFormat))
allowedStates.add(ResourceState::Present);
// IndirectArgument
allowedStates.add(ResourceState::IndirectArgument);
diff --git a/tools/gfx/vulkan/vk-pipeline-state.cpp b/tools/gfx/vulkan/vk-pipeline-state.cpp
index 06bd13197..4be9877af 100644
--- a/tools/gfx/vulkan/vk-pipeline-state.cpp
+++ b/tools/gfx/vulkan/vk-pipeline-state.cpp
@@ -329,7 +329,7 @@ uint32_t RayTracingPipelineStateImpl::findEntryPointIndexByName(
if (!name)
return VK_SHADER_UNUSED_KHR;
- auto indexPtr = entryPointNameToIndex.TryGetValue(String(name));
+ auto indexPtr = entryPointNameToIndex.tryGetValue(String(name));
if (indexPtr)
return (uint32_t)*indexPtr;
// TODO: Error reporting?
@@ -360,7 +360,7 @@ Result RayTracingPipelineStateImpl::createVKRayTracingPipelineState()
{
auto stageCreateInfo = programImpl->m_stageCreateInfos[i];
auto entryPointName = programImpl->m_entryPointNames[i];
- entryPointNameToIndex.Add(entryPointName, i);
+ entryPointNameToIndex.add(entryPointName, i);
if (stageCreateInfo.stage &
(VK_SHADER_STAGE_ANY_HIT_BIT_KHR | VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR |
VK_SHADER_STAGE_INTERSECTION_BIT_KHR))
@@ -380,7 +380,7 @@ Result RayTracingPipelineStateImpl::createVKRayTracingPipelineState()
auto shaderGroupName = entryPointName;
auto shaderGroupIndex = shaderGroupInfos.getCount();
shaderGroupInfos.add(shaderGroupInfo);
- shaderGroupNameToIndex.Add(shaderGroupName, shaderGroupIndex);
+ shaderGroupNameToIndex.add(shaderGroupName, shaderGroupIndex);
}
for (int32_t i = 0; i < desc.rayTracing.hitGroupDescs.getCount(); ++i)
@@ -404,7 +404,7 @@ Result RayTracingPipelineStateImpl::createVKRayTracingPipelineState()
auto shaderGroupIndex = shaderGroupInfos.getCount();
shaderGroupInfos.add(shaderGroupInfo);
- shaderGroupNameToIndex.Add(String(groupDesc.hitGroupName), shaderGroupIndex);
+ shaderGroupNameToIndex.add(String(groupDesc.hitGroupName), shaderGroupIndex);
}
raytracingPipelineInfo.groupCount = (uint32_t)shaderGroupInfos.getCount();
diff --git a/tools/gfx/vulkan/vk-shader-object-layout.cpp b/tools/gfx/vulkan/vk-shader-object-layout.cpp
index e1d06c791..03dc1f11a 100644
--- a/tools/gfx/vulkan/vk-shader-object-layout.cpp
+++ b/tools/gfx/vulkan/vk-shader-object-layout.cpp
@@ -12,7 +12,7 @@ namespace vk
Index ShaderObjectLayoutImpl::Builder::findOrAddDescriptorSet(Index space)
{
Index index;
- if (m_mapSpaceToDescriptorSetIndex.TryGetValue(space, index))
+ if (m_mapSpaceToDescriptorSetIndex.tryGetValue(space, index))
return index;
DescriptorSetInfo info = {};
@@ -21,7 +21,7 @@ Index ShaderObjectLayoutImpl::Builder::findOrAddDescriptorSet(Index space)
index = m_descriptorSetBuildInfos.getCount();
m_descriptorSetBuildInfos.add(info);
- m_mapSpaceToDescriptorSetIndex.Add(space, index);
+ m_mapSpaceToDescriptorSetIndex.add(space, index);
return index;
}
diff --git a/tools/gfx/vulkan/vk-shader-table.cpp b/tools/gfx/vulkan/vk-shader-table.cpp
index a47750ddb..f40331432 100644
--- a/tools/gfx/vulkan/vk-shader-table.cpp
+++ b/tools/gfx/vulkan/vk-shader-table.cpp
@@ -77,7 +77,7 @@ RefPtr<BufferResource> ShaderTableImpl::createDeviceBuffer(
auto dstHandlePtr = subTablePtr + i * rtProps.shaderGroupBaseAlignment;
auto shaderGroupName = m_shaderGroupNames[shaderTableEntryCounter++];
auto shaderGroupIndexPtr =
- pipelineImpl->shaderGroupNameToIndex.TryGetValue(shaderGroupName);
+ pipelineImpl->shaderGroupNameToIndex.tryGetValue(shaderGroupName);
if (!shaderGroupIndexPtr)
continue;
@@ -93,7 +93,7 @@ RefPtr<BufferResource> ShaderTableImpl::createDeviceBuffer(
auto dstHandlePtr = subTablePtr + i * handleSize;
auto shaderGroupName = m_shaderGroupNames[shaderTableEntryCounter++];
auto shaderGroupIndexPtr =
- pipelineImpl->shaderGroupNameToIndex.TryGetValue(shaderGroupName);
+ pipelineImpl->shaderGroupNameToIndex.tryGetValue(shaderGroupName);
if (!shaderGroupIndexPtr)
continue;
@@ -108,7 +108,7 @@ RefPtr<BufferResource> ShaderTableImpl::createDeviceBuffer(
auto dstHandlePtr = subTablePtr + i * handleSize;
auto shaderGroupName = m_shaderGroupNames[shaderTableEntryCounter++];
auto shaderGroupIndexPtr =
- pipelineImpl->shaderGroupNameToIndex.TryGetValue(shaderGroupName);
+ pipelineImpl->shaderGroupNameToIndex.tryGetValue(shaderGroupName);
if (!shaderGroupIndexPtr)
continue;
diff --git a/tools/platform/linux/x11-key-code.cpp b/tools/platform/linux/x11-key-code.cpp
index ce4e8945c..c078a6d1c 100644
--- a/tools/platform/linux/x11-key-code.cpp
+++ b/tools/platform/linux/x11-key-code.cpp
@@ -124,7 +124,7 @@ namespace platform
KeyCode translateKeyCode(int keyCode)
{
KeyCode result = KeyCode::None;
- keyCodeMap.TryGetValue(keyCode, result);
+ keyCodeMap.tryGetValue(keyCode, result);
return result;
}
diff --git a/tools/platform/linux/x11-window.cpp b/tools/platform/linux/x11-window.cpp
index 2721c00f3..be807ac33 100644
--- a/tools/platform/linux/x11-window.cpp
+++ b/tools/platform/linux/x11-window.cpp
@@ -179,7 +179,7 @@ public:
{
if (handle)
{
- X11AppContext::windows.Remove(handle);
+ X11AppContext::windows.remove(handle);
XDestroyWindow(X11AppContext::xdisplay, handle);
handle = 0;
}
@@ -382,7 +382,7 @@ void doEventsImpl(bool waitForEvents)
else if (X11AppContext::keyStates[iKeyCode] == KeyState::Pressed)
X11AppContext::keyStates[iKeyCode] = KeyState::Hold;
}
- if (X11AppContext::windows.TryGetValue(nextEvent.xkey.window, sysWindow))
+ if (X11AppContext::windows.tryGetValue(nextEvent.xkey.window, sysWindow))
{
wchar_t keyChar = getKeyChar(vKeyCode, nextEvent.xkey.state);
sysWindow->handleKeyEvent(KeyEvent::Press, vKeyCode, keyChar, nextEvent.xkey.state);
@@ -395,13 +395,13 @@ void doEventsImpl(bool waitForEvents)
{
X11AppContext::keyStates[iKeyCode] = KeyState::Released;
}
- if (X11AppContext::windows.TryGetValue(nextEvent.xkey.window, sysWindow))
+ if (X11AppContext::windows.tryGetValue(nextEvent.xkey.window, sysWindow))
{
sysWindow->handleKeyEvent(KeyEvent::Release, vKeyCode, 0, nextEvent.xkey.state);
}
break;
case MotionNotify:
- if (X11AppContext::windows.TryGetValue(nextEvent.xmotion.window, sysWindow))
+ if (X11AppContext::windows.tryGetValue(nextEvent.xmotion.window, sysWindow))
{
X11AppContext::currentMouseEventWindow = sysWindow;
sysWindow->handleMouseEvent(MouseEvent::Move, nextEvent.xmotion.x, nextEvent.xmotion.y, 0,
@@ -409,7 +409,7 @@ void doEventsImpl(bool waitForEvents)
}
break;
case ButtonPress:
- if (X11AppContext::windows.TryGetValue(nextEvent.xbutton.window, sysWindow))
+ if (X11AppContext::windows.tryGetValue(nextEvent.xbutton.window, sysWindow))
{
X11AppContext::currentMouseEventWindow = sysWindow;
if (nextEvent.xbutton.button <= Button3)
@@ -424,7 +424,7 @@ void doEventsImpl(bool waitForEvents)
}
break;
case ButtonRelease:
- if (X11AppContext::windows.TryGetValue(nextEvent.xbutton.window, sysWindow))
+ if (X11AppContext::windows.tryGetValue(nextEvent.xbutton.window, sysWindow))
{
X11AppContext::currentMouseEventWindow = sysWindow;
sysWindow->handleMouseEvent(MouseEvent::Up, nextEvent.xbutton.x, nextEvent.xbutton.y, 0,
@@ -432,19 +432,19 @@ void doEventsImpl(bool waitForEvents)
}
break;
case ConfigureNotify:
- if (X11AppContext::windows.TryGetValue(nextEvent.xconfigure.window, sysWindow))
+ if (X11AppContext::windows.tryGetValue(nextEvent.xconfigure.window, sysWindow))
{
sysWindow->handleResizeEvent(nextEvent.xconfigure.width, nextEvent.xconfigure.height);
}
break;
case Expose:
- if (X11AppContext::windows.TryGetValue(nextEvent.xexpose.window, sysWindow))
+ if (X11AppContext::windows.tryGetValue(nextEvent.xexpose.window, sysWindow))
{
sysWindow->handleExposeEvent();
}
break;
case ClientMessage:
- if (X11AppContext::windows.TryGetValue(nextEvent.xclient.window, sysWindow))
+ if (X11AppContext::windows.tryGetValue(nextEvent.xclient.window, sysWindow))
{
Atom wmDelete = XInternAtom(X11AppContext::xdisplay, "WM_DELETE_WINDOW", True);
if (nextEvent.xclient.data.l[0] == wmDelete)
@@ -454,13 +454,13 @@ void doEventsImpl(bool waitForEvents)
}
break;
case FocusIn:
- if (X11AppContext::windows.TryGetValue(nextEvent.xfocus.window, sysWindow))
+ if (X11AppContext::windows.tryGetValue(nextEvent.xfocus.window, sysWindow))
{
sysWindow->handleFocus(true);
}
break;
case FocusOut:
- if (X11AppContext::windows.TryGetValue(nextEvent.xfocus.window, sysWindow))
+ if (X11AppContext::windows.tryGetValue(nextEvent.xfocus.window, sysWindow))
{
sysWindow->handleFocus(false);
}
diff --git a/tools/platform/windows/win-window.cpp b/tools/platform/windows/win-window.cpp
index d785b0fb7..896bbd2c6 100644
--- a/tools/platform/windows/win-window.cpp
+++ b/tools/platform/windows/win-window.cpp
@@ -71,7 +71,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
bool useDefProc = true;
Window* window = nullptr;
- Win32AppContext::windows.TryGetValue(hWnd, window);
+ Win32AppContext::windows.tryGetValue(hWnd, window);
switch (message)
{
case WM_LBUTTONUP:
@@ -400,7 +400,7 @@ public:
{
if (handle)
{
- Win32AppContext::windows.Remove(handle);
+ Win32AppContext::windows.remove(handle);
}
DestroyWindow(handle);
handle = NULL;
diff --git a/tools/slang-cpp-extractor/identifier-lookup.cpp b/tools/slang-cpp-extractor/identifier-lookup.cpp
index c429a29a4..6b60f573c 100644
--- a/tools/slang-cpp-extractor/identifier-lookup.cpp
+++ b/tools/slang-cpp-extractor/identifier-lookup.cpp
@@ -96,7 +96,7 @@ void IdentifierLookup::initDefault(const UnownedStringSlice& markPrefix)
StringBuilder buf;
for (Index i = 0; i < SLANG_COUNT_OF(names); ++i)
{
- buf.Clear();
+ buf.clear();
buf << markPrefix << names[i];
set(buf.getUnownedSlice(), styles[i]);
}
diff --git a/tools/slang-cpp-extractor/node.cpp b/tools/slang-cpp-extractor/node.cpp
index 3fbbf9c56..b606e4edf 100644
--- a/tools/slang-cpp-extractor/node.cpp
+++ b/tools/slang-cpp-extractor/node.cpp
@@ -156,7 +156,7 @@ void Node::calcAbsoluteName(StringBuilder& outName) const
EnumNode* enumNode = as<EnumNode>(node);
if (enumNode && enumNode->m_kind == Node::Kind::Enum)
{
- Node** nodePtr = enumNode->m_childMap.TryGetValue(name);
+ Node** nodePtr = enumNode->m_childMap.tryGetValue(name);
if (nodePtr)
{
return *nodePtr;
@@ -310,13 +310,13 @@ void ScopeNode::addChild(Node* child)
if (child->m_name.hasContent())
{
- m_childMap.Add(child->m_name.getContent(), child);
+ m_childMap.add(child->m_name.getContent(), child);
}
}
Node* ScopeNode::findChild(const UnownedStringSlice& name) const
{
- Node** nodePtr = m_childMap.TryGetValue(name);
+ Node** nodePtr = m_childMap.tryGetValue(name);
if (nodePtr)
{
return *nodePtr;
diff --git a/tools/slang-embed/slang-embed.cpp b/tools/slang-embed/slang-embed.cpp
index 7fb865eee..d3936af71 100644
--- a/tools/slang-embed/slang-embed.cpp
+++ b/tools/slang-embed/slang-embed.cpp
@@ -93,7 +93,7 @@ struct App
String canonicalPath;
if (SLANG_SUCCEEDED(Slang::Path::getCanonical(inputPath, canonicalPath)))
{
- if (!includedFiles.Add(canonicalPath))
+ if (!includedFiles.add(canonicalPath))
return;
}
diff --git a/tools/slang-test/options.cpp b/tools/slang-test/options.cpp
index ab0d3a01e..9989d8164 100644
--- a/tools/slang-test/options.cpp
+++ b/tools/slang-test/options.cpp
@@ -17,13 +17,13 @@ TestCategory* TestCategorySet::add(String const& name, TestCategory* parent)
category->name = name;
category->parent = parent;
- m_categoryMap.Add(name, category);
+ m_categoryMap.add(name, category);
return category;
}
TestCategory* TestCategorySet::find(String const& name)
{
- if (auto category = m_categoryMap.TryGetValue(name))
+ if (auto category = m_categoryMap.tryGetValue(name))
{
return category->Ptr();
}
@@ -239,7 +239,7 @@ static bool _isSubCommand(const char* arg)
auto category = categorySet->findOrError(*argCursor++);
if (category)
{
- optionsOut->includeCategories.Add(category, category);
+ optionsOut->includeCategories.add(category, category);
}
}
else if (strcmp(arg, "-exclude") == 0)
@@ -252,7 +252,7 @@ static bool _isSubCommand(const char* arg)
auto category = categorySet->findOrError(*argCursor++);
if (category)
{
- optionsOut->excludeCategories.Add(category, category);
+ optionsOut->excludeCategories.add(category, category);
}
}
else if (strcmp(arg, "-api") == 0)
diff --git a/tools/slang-test/slang-test-main.cpp b/tools/slang-test/slang-test-main.cpp
index 739ea840e..94329831b 100644
--- a/tools/slang-test/slang-test-main.cpp
+++ b/tools/slang-test/slang-test-main.cpp
@@ -82,11 +82,11 @@ struct TestOptions
// Small helper to help consistently interrogating for filecheck usage
bool getFileCheckPrefix(String& prefix) const
{
- return commandOptions.TryGetValue("filecheck", prefix);
+ return commandOptions.tryGetValue("filecheck", prefix);
}
bool getFileCheckBufferPrefix(String& prefix) const
{
- return commandOptions.TryGetValue("filecheck-buffer", prefix);
+ return commandOptions.tryGetValue("filecheck-buffer", prefix);
}
Type type = Type::Normal;
@@ -160,7 +160,7 @@ static SlangResult _readTestFile(const TestInput& input, const String& suffix, S
return r;
}
- buf.Clear();
+ buf.clear();
buf << input.filePath << suffix;
return Slang::File::readAllText(buf, out);
}
@@ -335,11 +335,11 @@ static SlangResult _parseCommandArguments(char const** ioCursor, TestOptions& ou
auto i = option.indexOf('=');
if(i == -1)
{
- out.commandOptions.Add(option.trim(), "");
+ out.commandOptions.add(option.trim(), "");
}
else
{
- out.commandOptions.Add(option.head(i).trim(), option.tail(i+1).trim());
+ out.commandOptions.add(option.head(i).trim(), option.tail(i+1).trim());
}
}
}
@@ -1345,7 +1345,7 @@ String findExpectedPath(const TestInput& input, const char* postFix)
// Try the default name
StringBuilder defaultBuf;
- defaultBuf.Clear();
+ defaultBuf.clear();
defaultBuf << input.filePath;
if (postFix)
{
@@ -3610,7 +3610,7 @@ bool testCategoryMatches(
{
for( auto item : categorySet )
{
- if(testCategoryMatches(categoryToMatch, item.Value))
+ if(testCategoryMatches(categoryToMatch, item.value))
return true;
}
return false;
@@ -4381,15 +4381,15 @@ SlangResult innerMain(int argc, char** argv)
return func(StdWriters::getSingleton(), context.getSession(), int(args.getCount()), args.getBuffer());
}
- if( options.includeCategories.Count() == 0 )
+ if( options.includeCategories.getCount() == 0 )
{
- options.includeCategories.Add(fullTestCategory, fullTestCategory);
+ options.includeCategories.add(fullTestCategory, fullTestCategory);
}
// Don't include OptiX tests unless the client has explicit opted into them.
- if( !options.includeCategories.ContainsKey(optixTestCategory) )
+ if( !options.includeCategories.containsKey(optixTestCategory) )
{
- options.excludeCategories.Add(optixTestCategory, optixTestCategory);
+ options.excludeCategories.add(optixTestCategory, optixTestCategory);
}
// Exclude rendering tests when building under AppVeyor.
@@ -4397,8 +4397,8 @@ SlangResult innerMain(int argc, char** argv)
// TODO: this is very ad hoc, and we should do something cleaner.
if( options.outputMode == TestOutputMode::AppVeyor )
{
- options.excludeCategories.Add(renderTestCategory, renderTestCategory);
- options.excludeCategories.Add(vulkanTestCategory, vulkanTestCategory);
+ options.excludeCategories.add(renderTestCategory, renderTestCategory);
+ options.excludeCategories.add(vulkanTestCategory, vulkanTestCategory);
}
{
diff --git a/tools/slang-test/test-context.cpp b/tools/slang-test/test-context.cpp
index 15b07444c..e0f2749b9 100644
--- a/tools/slang-test/test-context.cpp
+++ b/tools/slang-test/test-context.cpp
@@ -111,7 +111,7 @@ TestContext::~TestContext()
TestContext::InnerMainFunc TestContext::getInnerMainFunc(const String& dirPath, const String& name)
{
{
- SharedLibraryTool* tool = m_sharedLibTools.TryGetValue(name);
+ SharedLibraryTool* tool = m_sharedLibTools.tryGetValue(name);
if (tool)
{
return tool->m_func;
@@ -135,13 +135,13 @@ TestContext::InnerMainFunc TestContext::getInnerMainFunc(const String& dirPath,
tool.m_func = (InnerMainFunc)tool.m_sharedLibrary->findFuncByName("innerMain");
}
- m_sharedLibTools.Add(name, tool);
+ m_sharedLibTools.add(name, tool);
return tool.m_func;
}
void TestContext::setInnerMainFunc(const String& name, InnerMainFunc func)
{
- SharedLibraryTool* tool = m_sharedLibTools.TryGetValue(name);
+ SharedLibraryTool* tool = m_sharedLibTools.tryGetValue(name);
if (tool)
{
tool->m_sharedLibrary.setNull();
@@ -151,7 +151,7 @@ void TestContext::setInnerMainFunc(const String& name, InnerMainFunc func)
{
SharedLibraryTool tool = {};
tool.m_func = func;
- m_sharedLibTools.Add(name, tool);
+ m_sharedLibTools.add(name, tool);
}
}
diff --git a/tools/slang-test/test-reporter.cpp b/tools/slang-test/test-reporter.cpp
index b2d0d1a54..2d252ebed 100644
--- a/tools/slang-test/test-reporter.cpp
+++ b/tools/slang-test/test-reporter.cpp
@@ -121,7 +121,7 @@ void TestReporter::startTest(const char* testName)
m_currentInfo = TestInfo();
m_currentInfo.name = testName;
- m_currentMessage.Clear();
+ m_currentMessage.clear();
}
void TestReporter::endTest()
diff --git a/tools/slang-unit-test/unit-test-process.cpp b/tools/slang-unit-test/unit-test-process.cpp
index 839a19f5d..d24120716 100644
--- a/tools/slang-unit-test/unit-test-process.cpp
+++ b/tools/slang-unit-test/unit-test-process.cpp
@@ -102,7 +102,7 @@ static SlangResult _countTest(UnitTestContext* context, Index size, Index crashI
if (crashIndex >= 0)
{
- buf.Clear();
+ buf.clear();
buf << crashIndex;
args.add(buf);
}
diff --git a/tools/slang-unit-test/unit-test-string.cpp b/tools/slang-unit-test/unit-test-string.cpp
index 629ed2373..230cb72f8 100644
--- a/tools/slang-unit-test/unit-test-string.cpp
+++ b/tools/slang-unit-test/unit-test-string.cpp
@@ -159,13 +159,13 @@ SLANG_UNIT_TEST(string)
StringBuilder builder;
{
- builder.Clear();
+ builder.clear();
StringUtil::join(values, 0, ',', builder);
SLANG_CHECK(builder == "");
}
{
- builder.Clear();
+ builder.clear();
StringUtil::join(values, 1, ',', builder);
SLANG_CHECK(builder == "hello");
@@ -174,7 +174,7 @@ SLANG_UNIT_TEST(string)
}
{
- builder.Clear();
+ builder.clear();
StringUtil::join(values, 2, ',', builder);
SLANG_CHECK(builder == "hello,world");
@@ -183,7 +183,7 @@ SLANG_UNIT_TEST(string)
}
{
- builder.Clear();
+ builder.clear();
StringUtil::join(values, 3, UnownedStringSlice("ab"), builder);
SLANG_CHECK(builder == "helloabworldab!");
@@ -212,7 +212,7 @@ SLANG_UNIT_TEST(string)
for (auto value : values)
{
- buf.Clear();
+ buf.clear();
_append(value, buf);
UnownedStringSlice slice = buf.getUnownedSlice();
@@ -244,7 +244,7 @@ SLANG_UNIT_TEST(string)
for (auto value : values)
{
- buf.Clear();
+ buf.clear();
buf << value;
diff --git a/tools/test-process/test-process-main.cpp b/tools/test-process/test-process-main.cpp
index 4e40a954e..852b58cef 100644
--- a/tools/test-process/test-process-main.cpp
+++ b/tools/test-process/test-process-main.cpp
@@ -49,7 +49,7 @@ static SlangResult _outputCount(int argc, const char* const* argv)
StringBuilder buf;
for (Index i = 0; i < count; ++i)
{
- buf.Clear();
+ buf.clear();
buf << i << "\n";
fwrite(buf.getBuffer(), 1, buf.getLength(), fileOut);
diff --git a/tools/test-server/test-server-main.cpp b/tools/test-server/test-server-main.cpp
index 77951d3d3..904a8db20 100644
--- a/tools/test-server/test-server-main.cpp
+++ b/tools/test-server/test-server-main.cpp
@@ -187,7 +187,7 @@ TestServer::~TestServer()
{
for (auto& pair : m_unitTestModules)
{
- pair.Value->destroy();
+ pair.value->destroy();
}
}
@@ -209,7 +209,7 @@ slang::IGlobalSession* TestServer::getOrCreateGlobalSession()
ISlangSharedLibrary* TestServer::loadSharedLibrary(const String& name, DiagnosticSink* sink)
{
ComPtr<ISlangSharedLibrary> lib;
- if (m_sharedLibraryMap.TryGetValue(name, lib))
+ if (m_sharedLibraryMap.tryGetValue(name, lib))
{
return lib;
}
@@ -229,13 +229,13 @@ ISlangSharedLibrary* TestServer::loadSharedLibrary(const String& name, Diagnosti
return nullptr;
}
- m_sharedLibraryMap.Add(name, sharedLibrary);
+ m_sharedLibraryMap.add(name, sharedLibrary);
return sharedLibrary;
}
IUnitTestModule* TestServer::getUnitTestModule(const String& name, DiagnosticSink* sink)
{
- auto unitTestModulePtr = m_unitTestModules.TryGetValue(name);
+ auto unitTestModulePtr = m_unitTestModules.tryGetValue(name);
if (unitTestModulePtr)
{
return *unitTestModulePtr;
@@ -270,7 +270,7 @@ IUnitTestModule* TestServer::getUnitTestModule(const String& name, DiagnosticSin
return nullptr;
}
- m_unitTestModules.Add(name, testModule);
+ m_unitTestModules.add(name, testModule);
return testModule;
}