summaryrefslogtreecommitdiff
path: root/source/slang/slang-check-constraint.cpp
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2020-05-22 14:21:37 -0400
committerGitHub <noreply@github.com>2020-05-22 11:21:37 -0700
commit076a4c06767cca12c5205d950e9cd37451f91488 (patch)
treedc3bcc376e18e5233f61b2cedfa3419717798a01 /source/slang/slang-check-constraint.cpp
parentdaf53bb2708982a2bcc6d6cc08fe88790ccf0bc2 (diff)
Tidy up around AST nodes (#1353)
* Fields from upper to lower case in slang-ast-decl.h * Lower camel field names in slang-ast-stmt.h * Fix fields in slang-ast-expr.h * slang-ast-type.h make fields lowerCamel. * slang-ast-base.h members functions lowerCamel. * Method names in slang-ast-type.h to lowerCamel. * GetCanonicalType -> getCanonicalType * Substitute -> substitute * Equals -> equals ToString -> toString * ParentDecl -> parentDecl Members -> members
Diffstat (limited to 'source/slang/slang-check-constraint.cpp')
-rw-r--r--source/slang/slang-check-constraint.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/slang/slang-check-constraint.cpp b/source/slang/slang-check-constraint.cpp
index e12997904..a5a5620ae 100644
--- a/source/slang/slang-check-constraint.cpp
+++ b/source/slang/slang-check-constraint.cpp
@@ -178,7 +178,7 @@ namespace Slang
RefPtr<Type> right)
{
// Easy case: they are the same type!
- if (left->Equals(right))
+ if (left->equals(right))
return left;
// We can join two basic types by picking the "better" of the two
@@ -217,7 +217,7 @@ namespace Slang
if(auto rightVector = as<VectorExpressionType>(right))
{
// Check if the vector sizes match
- if(!leftVector->elementCount->EqualsVal(rightVector->elementCount.Ptr()))
+ if(!leftVector->elementCount->equalsVal(rightVector->elementCount.Ptr()))
return nullptr;
// Try to join the element types
@@ -352,7 +352,7 @@ namespace Slang
}
else
{
- if(!val->EqualsVal(cVal))
+ if(!val->equalsVal(cVal))
{
// failure!
return SubstitutionSet();
@@ -592,7 +592,7 @@ namespace Slang
// specialized (don't accidentially constrain
// parameters of a generic function based on
// calls in its body).
- if(paramDecl->ParentDecl != constraints.genericDecl)
+ if(paramDecl->parentDecl != constraints.genericDecl)
return false;
// We want to constrain the given parameter to equal the given value.
@@ -664,7 +664,7 @@ namespace Slang
RefPtr<Type> fst,
RefPtr<Type> snd)
{
- if (fst->Equals(snd)) return true;
+ if (fst->equals(snd)) return true;
// An error type can unify with anything, just so we avoid cascading errors.
@@ -684,7 +684,7 @@ namespace Slang
if (auto typeParamDecl = as<GenericTypeParamDecl>(fstDeclRef.getDecl()))
{
- if(typeParamDecl->ParentDecl == constraints.genericDecl )
+ if(typeParamDecl->parentDecl == constraints.genericDecl )
return TryUnifyTypeParam(constraints, typeParamDecl, snd);
}
}
@@ -695,7 +695,7 @@ namespace Slang
if (auto typeParamDecl = as<GenericTypeParamDecl>(sndDeclRef.getDecl()))
{
- if(typeParamDecl->ParentDecl == constraints.genericDecl )
+ if(typeParamDecl->parentDecl == constraints.genericDecl )
return TryUnifyTypeParam(constraints, typeParamDecl, fst);
}
}