From eb06f6a474dbc38ff557e95f58234262f508e41b Mon Sep 17 00:00:00 2001 From: deltaoscarmike <37912794+deltaoscarmike@users.noreply.github.com> Date: Tue, 20 Nov 2018 20:29:09 +0100 Subject: [PATCH] Assignement -> Assignment --- .../Renderer/hlslparser/src/GLSLGenerator.cpp | 26 +++++++++---------- .../Renderer/hlslparser/src/GLSLGenerator.h | 6 ++--- .../Renderer/hlslparser/src/HLSLTree.cpp | 16 ++++++------ .../Renderer/hlslparser/src/HLSLTree.h | 2 +- 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/libprojectM/Renderer/hlslparser/src/GLSLGenerator.cpp b/src/libprojectM/Renderer/hlslparser/src/GLSLGenerator.cpp index 4e5f94ba1..079de8c1e 100755 --- a/src/libprojectM/Renderer/hlslparser/src/GLSLGenerator.cpp +++ b/src/libprojectM/Renderer/hlslparser/src/GLSLGenerator.cpp @@ -147,7 +147,7 @@ bool GLSLGenerator::Generate(HLSLTree* tree, Target target, Version version, con m_versionLegacy = (version == Version_110 || version == Version_100_ES); m_options = options; - globalVarsAssignements.clear(); + globalVarsAssignments.clear(); ChooseUniqueName("matrix_row", m_matrixRowFunction, sizeof(m_matrixRowFunction)); ChooseUniqueName("matrix_ctor", m_matrixCtorFunction, sizeof(m_matrixCtorFunction)); @@ -184,7 +184,7 @@ bool GLSLGenerator::Generate(HLSLTree* tree, Target target, Version version, con m_outAttribPrefix = "rast_"; } - m_tree->ReplaceUniformsAssignements(); + m_tree->ReplaceUniformsAssignments(); HLSLRoot* root = m_tree->GetRoot(); HLSLStatement* statement = root->statement; @@ -1055,10 +1055,10 @@ void GLSLGenerator::OutputStatements(int indent, HLSLStatement* statement, const // GLSL doesn't seem have texture uniforms, so just ignore them. if (declaration->type.baseType != HLSLBaseType_Texture) { - bool skipAssignement = true; + bool skipAssignment = true; if (indent != 0) { - skipAssignement = false; + skipAssignment = false; } m_writer.BeginLine(indent, declaration->fileName, declaration->line); @@ -1066,9 +1066,9 @@ void GLSLGenerator::OutputStatements(int indent, HLSLStatement* statement, const { // At the top level, we need the "uniform" keyword. m_writer.Write("uniform "); - skipAssignement = false; + skipAssignment = false; } - OutputDeclaration(declaration, skipAssignement); + OutputDeclaration(declaration, skipAssignment); m_writer.EndLine(";"); } } @@ -1796,12 +1796,12 @@ void GLSLGenerator::OutputEntryCaller(HLSLFunction* entryFunction) // Initialize global variables - for(HLSLDeclaration *declaration : globalVarsAssignements) + for(HLSLDeclaration *declaration : globalVarsAssignments) { m_writer.BeginLine(1, declaration->fileName, declaration->line); OutputDeclarationBody( declaration->type, GetSafeIdentifierName( declaration->name ) ); - OutputDeclarationAssignement(declaration); + OutputDeclarationAssignment(declaration); m_writer.EndLine(";"); } @@ -1861,7 +1861,7 @@ void GLSLGenerator::OutputEntryCaller(HLSLFunction* entryFunction) m_writer.WriteLine(0, "}"); } -void GLSLGenerator::OutputDeclaration(HLSLDeclaration* declaration, const bool skipAssignement) +void GLSLGenerator::OutputDeclaration(HLSLDeclaration* declaration, const bool skipAssignment) { OutputDeclarationType( declaration->type ); @@ -1875,13 +1875,13 @@ void GLSLGenerator::OutputDeclaration(HLSLDeclaration* declaration, const bool s if( declaration->assignment != NULL ) { - if (!skipAssignement) + if (!skipAssignment) { - OutputDeclarationAssignement(declaration); + OutputDeclarationAssignment(declaration); } else { - globalVarsAssignements.push_back(declaration); + globalVarsAssignments.push_back(declaration); } } @@ -1890,7 +1890,7 @@ void GLSLGenerator::OutputDeclaration(HLSLDeclaration* declaration, const bool s } } -void GLSLGenerator::OutputDeclarationAssignement(HLSLDeclaration* declaration) +void GLSLGenerator::OutputDeclarationAssignment(HLSLDeclaration* declaration) { m_writer.Write( " = " ); if( declaration->type.array ) diff --git a/src/libprojectM/Renderer/hlslparser/src/GLSLGenerator.h b/src/libprojectM/Renderer/hlslparser/src/GLSLGenerator.h index 443288112..098425231 100755 --- a/src/libprojectM/Renderer/hlslparser/src/GLSLGenerator.h +++ b/src/libprojectM/Renderer/hlslparser/src/GLSLGenerator.h @@ -83,11 +83,11 @@ private: void OutputAttribute(const HLSLType& type, const char* semantic, AttributeModifier modifier); void OutputAttributes(HLSLFunction* entryFunction); void OutputEntryCaller(HLSLFunction* entryFunction); - void OutputDeclaration(HLSLDeclaration* declaration, const bool skipAssignement); + void OutputDeclaration(HLSLDeclaration* declaration, const bool skipAssignment); void OutputDeclarationType( const HLSLType& type ); void OutputDeclarationBody( const HLSLType& type, const char* name ); void OutputDeclaration(const HLSLType& type, const char* name); - void OutputDeclarationAssignement(HLSLDeclaration* declaration); + void OutputDeclarationAssignment(HLSLDeclaration* declaration); void OutputCast(const HLSLType& type); void OutputSetOutAttribute(const char* semantic, const char* resultName); @@ -163,7 +163,7 @@ private: std::vector matrixCtors; std::map matrixCtorsId; - std::vector globalVarsAssignements; + std::vector globalVarsAssignments; }; diff --git a/src/libprojectM/Renderer/hlslparser/src/HLSLTree.cpp b/src/libprojectM/Renderer/hlslparser/src/HLSLTree.cpp index 9c8f98f21..0e7d5cb25 100755 --- a/src/libprojectM/Renderer/hlslparser/src/HLSLTree.cpp +++ b/src/libprojectM/Renderer/hlslparser/src/HLSLTree.cpp @@ -610,14 +610,14 @@ int HLSLTree::GetExpressionValue(HLSLExpression * expression, float values[4]) return 0; } -bool HLSLTree::ReplaceUniformsAssignements() +bool HLSLTree::ReplaceUniformsAssignments() { - struct ReplaceUniformsAssignementsVisitor: HLSLTreeVisitor + struct ReplaceUniformsAssignmentsVisitor: HLSLTreeVisitor { HLSLTree * tree; std::map uniforms; std::map uniformsReplaced; - bool withinAssignement; + bool withinAssignment; virtual void VisitDeclaration(HLSLDeclaration * node) { @@ -660,17 +660,17 @@ bool HLSLTree::ReplaceUniformsAssignements() if (IsAssignOp(node->binaryOp)) { - withinAssignement = true; + withinAssignment = true; } VisitExpression(node->expression1); - withinAssignement = false; + withinAssignment = false; } virtual void VisitIdentifierExpression(HLSLIdentifierExpression * node) { - if (withinAssignement) + if (withinAssignment) { // Check if variable is a uniform if (uniforms.find(node->name) != uniforms.end()) @@ -699,9 +699,9 @@ bool HLSLTree::ReplaceUniformsAssignements() } }; - ReplaceUniformsAssignementsVisitor visitor; + ReplaceUniformsAssignmentsVisitor visitor; visitor.tree = this; - visitor.withinAssignement = false; + visitor.withinAssignment = false; visitor.VisitRoot(m_root); return true; diff --git a/src/libprojectM/Renderer/hlslparser/src/HLSLTree.h b/src/libprojectM/Renderer/hlslparser/src/HLSLTree.h index 4400655af..109d471f5 100755 --- a/src/libprojectM/Renderer/hlslparser/src/HLSLTree.h +++ b/src/libprojectM/Renderer/hlslparser/src/HLSLTree.h @@ -993,7 +993,7 @@ public: int GetExpressionValue(HLSLExpression * expression, float values[4]); bool NeedsFunction(const char * name); - bool ReplaceUniformsAssignements(); + bool ReplaceUniformsAssignments(); void EnumerateMatrixCtorsNeeded(std::vector & matrixCtors); private: