Chromium Code Reviews| Index: src/sksl/ir/SkSLVariable.h |
| diff --git a/src/sksl/ir/SkSLVariable.h b/src/sksl/ir/SkSLVariable.h |
| index d4ea2c4a43e78ce8c2ba829dace13b8accd3f1c4..7dcf59ede0d75e37c02afed2bf99a8174e9bc6d6 100644 |
| --- a/src/sksl/ir/SkSLVariable.h |
| +++ b/src/sksl/ir/SkSLVariable.h |
| @@ -27,7 +27,7 @@ struct Variable : public Symbol { |
| kParameter_Storage |
| }; |
| - Variable(Position position, Modifiers modifiers, std::string name, std::shared_ptr<Type> type, |
| + Variable(Position position, Modifiers modifiers, std::string name, const Type& type, |
| Storage storage) |
| : INHERITED(position, kVariable_Kind, std::move(name)) |
| , fModifiers(modifiers) |
| @@ -37,12 +37,12 @@ struct Variable : public Symbol { |
| , fIsWrittenTo(false) {} |
| virtual std::string description() const override { |
| - return fModifiers.description() + fType->fName + " " + fName; |
| + return fModifiers.description() + fType.fName + " " + fName; |
| } |
| const Modifiers fModifiers; |
| const std::string fValue; |
|
dogben
2016/07/08 19:56:40
nit: unused?
|
| - const std::shared_ptr<Type> fType; |
| + const Type& fType; |
| const Storage fStorage; |
| mutable bool fIsReadFrom; |
| @@ -58,7 +58,7 @@ namespace std { |
| struct hash<SkSL::Variable> { |
|
dogben
2016/07/08 19:56:40
(Not exactly related to this CL, but...) Is this u
|
| public : |
| size_t operator()(const SkSL::Variable &var) const{ |
| - return hash<std::string>()(var.fName) ^ hash<std::string>()(var.fType->description()); |
| + return hash<std::string>()(var.fName) ^ hash<std::string>()(var.fType.description()); |
| } |
| }; |
| } // namespace std |