aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sksl/ir/SkSLBoolLiteral.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/sksl/ir/SkSLBoolLiteral.h')
-rw-r--r--src/sksl/ir/SkSLBoolLiteral.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/sksl/ir/SkSLBoolLiteral.h b/src/sksl/ir/SkSLBoolLiteral.h
index 9a69f0f138..d979ed3939 100644
--- a/src/sksl/ir/SkSLBoolLiteral.h
+++ b/src/sksl/ir/SkSLBoolLiteral.h
@@ -38,9 +38,18 @@ struct BoolLiteral : public Expression {
return fValue == b.fValue;
}
+ std::unique_ptr<Expression> clone() const override {
+ return std::unique_ptr<Expression>(new BoolLiteral(fOffset, fValue, &fType));
+ }
+
const bool fValue;
typedef Expression INHERITED;
+
+private:
+ BoolLiteral(int offset, bool value, const Type* type)
+ : INHERITED(offset, kBoolLiteral_Kind, *type)
+ , fValue(value) {}
};
} // namespace