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 /source/compiler-core/slang-diagnostic-sink.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 'source/compiler-core/slang-diagnostic-sink.cpp')
| -rw-r--r-- | source/compiler-core/slang-diagnostic-sink.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source/compiler-core/slang-diagnostic-sink.cpp b/source/compiler-core/slang-diagnostic-sink.cpp index fa638316c..49aed3000 100644 --- a/source/compiler-core/slang-diagnostic-sink.cpp +++ b/source/compiler-core/slang-diagnostic-sink.cpp @@ -295,7 +295,7 @@ static void _sourceLocationNoteDiagnostic(DiagnosticSink* sink, SourceView* sour // Now make all spaces const Index length = caretLine.getLength(); - caretLine.Clear(); + caretLine.clear(); caretLine.appendRepeatedChar(' ', length); Index caretIndex = caretLine.getLength(); @@ -506,7 +506,7 @@ void DiagnosticSink::reset() m_errorCount = 0; m_internalErrorLocsNoted = 0; - outputBuffer.Clear(); + outputBuffer.clear(); } @@ -584,7 +584,7 @@ Severity DiagnosticSink::getEffectiveMessageSeverity(DiagnosticInfo const& info) { Severity effectiveSeverity = info.severity; - Severity* pSeverityOverride = m_severityOverrides.TryGetValue(info.id); + Severity* pSeverityOverride = m_severityOverrides.tryGetValue(info.id); // See if there is an override if (pSeverityOverride) @@ -676,7 +676,7 @@ void DiagnosticSink::overrideDiagnosticSeverity(int diagnosticId, Severity overr // If the override is the same as the default, we can just remove the override if (info->severity == overrideSeverity) { - m_severityOverrides.Remove(diagnosticId); + m_severityOverrides.remove(diagnosticId); return; } } @@ -689,14 +689,14 @@ void DiagnosticSink::overrideDiagnosticSeverity(int diagnosticId, Severity overr Index DiagnosticsLookup::_findDiagnosticIndexByExactName(const UnownedStringSlice& slice) const { - const Index* indexPtr = m_nameMap.TryGetValue(slice); + const Index* indexPtr = m_nameMap.tryGetValue(slice); return indexPtr ? *indexPtr : -1; } void DiagnosticsLookup::_addName(const char* name, Index diagnosticIndex) { UnownedStringSlice nameSlice(name); - m_nameMap.Add(nameSlice, diagnosticIndex); + m_nameMap.add(nameSlice, diagnosticIndex); } void DiagnosticsLookup::addAlias(const char* name, const char* diagnosticName) @@ -711,13 +711,13 @@ void DiagnosticsLookup::addAlias(const char* name, const char* diagnosticName) const DiagnosticInfo* DiagnosticsLookup::getDiagnosticById(Int id) const { - const auto indexPtr = m_idMap.TryGetValue(id); + const auto indexPtr = m_idMap.tryGetValue(id); return indexPtr ? m_diagnostics[*indexPtr] : nullptr; } const DiagnosticInfo* DiagnosticsLookup::findDiagnosticByExactName(const UnownedStringSlice& slice) const { - const Index* indexPtr = m_nameMap.TryGetValue(slice); + const Index* indexPtr = m_nameMap.tryGetValue(slice); return indexPtr ? m_diagnostics[*indexPtr] : nullptr; } @@ -746,7 +746,7 @@ Index DiagnosticsLookup::add(const DiagnosticInfo* info) m_diagnostics.add(info); _addName(info->name, diagnosticIndex); - m_idMap.AddIfNotExists(info->id, diagnosticIndex); + m_idMap.addIfNotExists(info->id, diagnosticIndex); return diagnosticIndex; } |
