diff --git a/src/sksl/SkSLIRGenerator.cpp b/src/sksl/SkSLIRGenerator.cpp index 5c6639727a..2c5db5e8df 100644 --- a/src/sksl/SkSLIRGenerator.cpp +++ b/src/sksl/SkSLIRGenerator.cpp @@ -1807,7 +1807,7 @@ std::unique_ptr IRGenerator::constantFoldVector(const Expression& le if (op == Token::Kind::TK_EQEQ || op == Token::Kind::TK_NEQ) { bool equality = (op == Token::Kind::TK_EQEQ); - switch (left.compareConstant(fContext, right)) { + switch (left.compareConstant(right)) { case Expression::ComparisonResult::kNotEqual: equality = !equality; [[fallthrough]]; @@ -1990,7 +1990,7 @@ std::unique_ptr IRGenerator::constantFold(const Expression& left, return nullptr; } - switch (left.compareConstant(fContext, right)) { + switch (left.compareConstant(right)) { case Expression::ComparisonResult::kNotEqual: equality = !equality; [[fallthrough]]; diff --git a/src/sksl/ir/SkSLBoolLiteral.h b/src/sksl/ir/SkSLBoolLiteral.h index 7b02fa3ec5..776e7b71d7 100644 --- a/src/sksl/ir/SkSLBoolLiteral.h +++ b/src/sksl/ir/SkSLBoolLiteral.h @@ -48,8 +48,7 @@ public: return true; } - ComparisonResult compareConstant(const Context& context, - const Expression& other) const override { + ComparisonResult compareConstant(const Expression& other) const override { if (!other.is()) { return ComparisonResult::kUnknown; } diff --git a/src/sksl/ir/SkSLConstructor.cpp b/src/sksl/ir/SkSLConstructor.cpp index d38c7f8b5e..a26ac8579e 100644 --- a/src/sksl/ir/SkSLConstructor.cpp +++ b/src/sksl/ir/SkSLConstructor.cpp @@ -67,8 +67,7 @@ std::unique_ptr Constructor::SimplifyConversion(const Type& construc return nullptr; } -Expression::ComparisonResult Constructor::compareConstant(const Context& context, - const Expression& other) const { +Expression::ComparisonResult Constructor::compareConstant(const Expression& other) const { if (!other.is()) { return ComparisonResult::kUnknown; } diff --git a/src/sksl/ir/SkSLConstructor.h b/src/sksl/ir/SkSLConstructor.h index 2eabede92d..2ed96167d6 100644 --- a/src/sksl/ir/SkSLConstructor.h +++ b/src/sksl/ir/SkSLConstructor.h @@ -104,8 +104,7 @@ public: return true; } - ComparisonResult compareConstant(const Context& context, - const Expression& other) const override; + ComparisonResult compareConstant(const Expression& other) const override; template ResultType getVecComponent(int index) const; diff --git a/src/sksl/ir/SkSLExpression.h b/src/sksl/ir/SkSLExpression.h index a3c16b02c4..6a452f3a15 100644 --- a/src/sksl/ir/SkSLExpression.h +++ b/src/sksl/ir/SkSLExpression.h @@ -113,8 +113,7 @@ public: kNotEqual, kEqual }; - virtual ComparisonResult compareConstant(const Context& context, - const Expression& other) const { + virtual ComparisonResult compareConstant(const Expression& other) const { return ComparisonResult::kUnknown; } diff --git a/src/sksl/ir/SkSLFloatLiteral.h b/src/sksl/ir/SkSLFloatLiteral.h index 380a6542dc..7ab91da171 100644 --- a/src/sksl/ir/SkSLFloatLiteral.h +++ b/src/sksl/ir/SkSLFloatLiteral.h @@ -55,8 +55,7 @@ public: return INHERITED::coercionCost(target); } - ComparisonResult compareConstant(const Context& context, - const Expression& other) const override { + ComparisonResult compareConstant(const Expression& other) const override { if (!other.is()) { return ComparisonResult::kUnknown; } diff --git a/src/sksl/ir/SkSLIntLiteral.h b/src/sksl/ir/SkSLIntLiteral.h index 8fe4ec6361..132f18a7e3 100644 --- a/src/sksl/ir/SkSLIntLiteral.h +++ b/src/sksl/ir/SkSLIntLiteral.h @@ -50,8 +50,7 @@ public: return true; } - ComparisonResult compareConstant(const Context& context, - const Expression& other) const override { + ComparisonResult compareConstant(const Expression& other) const override { if (!other.is()) { return ComparisonResult::kUnknown; }