diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2020-03-02 19:14:18 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-02 19:14:18 -0500 |
| commit | cbba1f2ba451f31e910d59fb9efbadc5e370c095 (patch) | |
| tree | cf34d86713e2f915a42ce4ece11b7da82b9d4454 /source/slang/slang-parameter-binding.cpp | |
| parent | dbd8e8dc0847338a2a93d35385f48b5ce5671dd6 (diff) | |
Renamed UnownedStringSlice::size to getLength to make match String. (#1254)
Diffstat (limited to 'source/slang/slang-parameter-binding.cpp')
| -rw-r--r-- | source/slang/slang-parameter-binding.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/slang/slang-parameter-binding.cpp b/source/slang/slang-parameter-binding.cpp index 0268e1850..786433836 100644 --- a/source/slang/slang-parameter-binding.cpp +++ b/source/slang/slang-parameter-binding.cpp @@ -453,7 +453,7 @@ static void splitNameAndIndex( LayoutResourceKind findRegisterClassFromName(UnownedStringSlice const& registerClassName) { - switch( registerClassName.size() ) + switch( registerClassName.getLength() ) { case 1: switch (*registerClassName.begin()) @@ -491,7 +491,7 @@ LayoutSemanticInfo ExtractLayoutSemanticInfo( info.kind = LayoutResourceKind::None; UnownedStringSlice registerName = semantic->registerName.Content; - if (registerName.size() == 0) + if (registerName.getLength() == 0) return info; // The register name is expected to be in the form: @@ -517,7 +517,7 @@ LayoutSemanticInfo ExtractLayoutSemanticInfo( // For a `register` semantic, the register index is not optional (unlike // how it works for varying input/output semantics). - if( registerIndexDigits.size() == 0 ) + if( registerIndexDigits.getLength() == 0 ) { getSink(context)->diagnose(semantic->registerName, Diagnostics::expectedARegisterIndex, registerClassName); } @@ -534,7 +534,7 @@ LayoutSemanticInfo ExtractLayoutSemanticInfo( if( auto registerSemantic = as<HLSLRegisterSemantic>(semantic) ) { auto const& spaceName = registerSemantic->spaceName.Content; - if(spaceName.size() != 0) + if(spaceName.getLength() != 0) { UnownedStringSlice spaceSpelling; UnownedStringSlice spaceDigits; @@ -548,7 +548,7 @@ LayoutSemanticInfo ExtractLayoutSemanticInfo( { getSink(context)->diagnose(registerSemantic->spaceName, Diagnostics::expectedSpace, spaceSpelling); } - else if( spaceDigits.size() == 0 ) + else if( spaceDigits.getLength() == 0 ) { getSink(context)->diagnose(registerSemantic->spaceName, Diagnostics::expectedSpaceIndex); } @@ -564,7 +564,7 @@ LayoutSemanticInfo ExtractLayoutSemanticInfo( } // TODO: handle component mask part of things... - if( semantic->componentMask.Content.size() != 0 ) + if( semantic->componentMask.Content.getLength() != 0 ) { getSink(context)->diagnose(semantic->componentMask, Diagnostics::componentMaskNotSupported); } @@ -1340,7 +1340,7 @@ SimpleSemanticInfo decomposeSimpleSemantic( // look for a trailing sequence of decimal digits // at the end of the composed name - UInt length = composedName.size(); + UInt length = composedName.getLength(); UInt indexLoc = length; while( indexLoc > 0 ) { |
