Remove unused context argument from compareConstant.
Change-Id: Ia49b9dceccb83f8316698ba13d0920a988335010
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/352040
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
diff --git a/src/sksl/SkSLIRGenerator.cpp b/src/sksl/SkSLIRGenerator.cpp
index 5c66397..2c5db5e 100644
--- a/src/sksl/SkSLIRGenerator.cpp
+++ b/src/sksl/SkSLIRGenerator.cpp
@@ -1807,7 +1807,7 @@
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 @@
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 7b02fa3..776e7b7 100644
--- a/src/sksl/ir/SkSLBoolLiteral.h
+++ b/src/sksl/ir/SkSLBoolLiteral.h
@@ -48,8 +48,7 @@
return true;
}
- ComparisonResult compareConstant(const Context& context,
- const Expression& other) const override {
+ ComparisonResult compareConstant(const Expression& other) const override {
if (!other.is<BoolLiteral>()) {
return ComparisonResult::kUnknown;
}
diff --git a/src/sksl/ir/SkSLConstructor.cpp b/src/sksl/ir/SkSLConstructor.cpp
index d38c7f8..a26ac85 100644
--- a/src/sksl/ir/SkSLConstructor.cpp
+++ b/src/sksl/ir/SkSLConstructor.cpp
@@ -67,8 +67,7 @@
return nullptr;
}
-Expression::ComparisonResult Constructor::compareConstant(const Context& context,
- const Expression& other) const {
+Expression::ComparisonResult Constructor::compareConstant(const Expression& other) const {
if (!other.is<Constructor>()) {
return ComparisonResult::kUnknown;
}
diff --git a/src/sksl/ir/SkSLConstructor.h b/src/sksl/ir/SkSLConstructor.h
index 2eabede..2ed9616 100644
--- a/src/sksl/ir/SkSLConstructor.h
+++ b/src/sksl/ir/SkSLConstructor.h
@@ -104,8 +104,7 @@
return true;
}
- ComparisonResult compareConstant(const Context& context,
- const Expression& other) const override;
+ ComparisonResult compareConstant(const Expression& other) const override;
template <typename ResultType>
ResultType getVecComponent(int index) const;
diff --git a/src/sksl/ir/SkSLExpression.h b/src/sksl/ir/SkSLExpression.h
index a3c16b0..6a452f3 100644
--- a/src/sksl/ir/SkSLExpression.h
+++ b/src/sksl/ir/SkSLExpression.h
@@ -113,8 +113,7 @@
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 380a654..7ab91da 100644
--- a/src/sksl/ir/SkSLFloatLiteral.h
+++ b/src/sksl/ir/SkSLFloatLiteral.h
@@ -55,8 +55,7 @@
return INHERITED::coercionCost(target);
}
- ComparisonResult compareConstant(const Context& context,
- const Expression& other) const override {
+ ComparisonResult compareConstant(const Expression& other) const override {
if (!other.is<FloatLiteral>()) {
return ComparisonResult::kUnknown;
}
diff --git a/src/sksl/ir/SkSLIntLiteral.h b/src/sksl/ir/SkSLIntLiteral.h
index 8fe4ec63..132f18a 100644
--- a/src/sksl/ir/SkSLIntLiteral.h
+++ b/src/sksl/ir/SkSLIntLiteral.h
@@ -50,8 +50,7 @@
return true;
}
- ComparisonResult compareConstant(const Context& context,
- const Expression& other) const override {
+ ComparisonResult compareConstant(const Expression& other) const override {
if (!other.is<IntLiteral>()) {
return ComparisonResult::kUnknown;
}