Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1330)

Unified Diff: src/sksl/SkSLParser.cpp

Issue 2300023002: minor SkSL changes to avoid compiler errors in Chromium (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/sksl/SkSLIRGenerator.cpp ('k') | src/sksl/SkSLSPIRVCodeGenerator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/sksl/SkSLParser.cpp
diff --git a/src/sksl/SkSLParser.cpp b/src/sksl/SkSLParser.cpp
index d6acc7d8a877c8e0998985c7338410da0a2eadb1..65187c3f4cab18ee53e3f0087119953fe0f2df25 100644
--- a/src/sksl/SkSLParser.cpp
+++ b/src/sksl/SkSLParser.cpp
@@ -316,7 +316,7 @@ std::unique_ptr<ASTType> Parser::structDeclaration() {
type = new Type(name, Type::kArray_Kind, *type, (int) columns);
fTypes.takeOwnership((Type*) type);
}
- fields.push_back(Type::Field(decl->fModifiers, decl->fNames[i], *type));
+ fields.push_back(Type::Field(decl->fModifiers, decl->fNames[i], type));
if (decl->fValues[i]) {
this->error(decl->fPosition, "initializers are not permitted on struct fields");
}
@@ -608,7 +608,8 @@ std::unique_ptr<ASTStatement> Parser::statement() {
return this->block();
case Token::SEMICOLON:
this->nextToken();
- return std::unique_ptr<ASTStatement>(new ASTBlock(start.fPosition, {}));
+ return std::unique_ptr<ASTStatement>(new ASTBlock(start.fPosition,
+ std::vector<std::unique_ptr<ASTStatement>>()));
case Token::CONST: // fall through
case Token::HIGHP: // fall through
case Token::MEDIUMP: // fall through
« no previous file with comments | « src/sksl/SkSLIRGenerator.cpp ('k') | src/sksl/SkSLSPIRVCodeGenerator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698