Index: src/sksl/SkSLIRGenerator.cpp |
diff --git a/src/sksl/SkSLIRGenerator.cpp b/src/sksl/SkSLIRGenerator.cpp |
index 5e136a4d2f8f971a58b1d25dead41725dcb4e797..c30cac17d76db3626ab059d6ecb6c1ff249ad56a 100644 |
--- a/src/sksl/SkSLIRGenerator.cpp |
+++ b/src/sksl/SkSLIRGenerator.cpp |
@@ -419,9 +419,8 @@ |
for (size_t i = 0; i < parameters.size(); i++) { |
if (parameters[i]->fModifiers != other->fParameters[i]->fModifiers) { |
fErrors.error(f.fPosition, "modifiers on parameter " + |
- to_string((uint64_t) i + 1) + |
- " differ between declaration and " |
- "definition"); |
+ to_string(i + 1) + " differ between " + |
+ "declaration and definition"); |
return nullptr; |
} |
} |
@@ -617,9 +616,8 @@ |
ASSERT(ctor); |
return this->call(Position(), std::move(ctor), std::move(args)); |
} |
- std::vector<std::unique_ptr<Expression>> args; |
- args.push_back(std::move(expr)); |
- return std::unique_ptr<Expression>(new Constructor(Position(), type, std::move(args))); |
+ ABORT("cannot coerce %s to %s", expr->fType.description().c_str(), |
+ type.description().c_str()); |
} |
static bool is_matrix_multiply(const Type& left, const Type& right) { |
@@ -834,12 +832,12 @@ |
std::vector<std::unique_ptr<Expression>> arguments) { |
if (function.fParameters.size() != arguments.size()) { |
std::string msg = "call to '" + function.fName + "' expected " + |
- to_string((uint64_t) function.fParameters.size()) + |
+ to_string(function.fParameters.size()) + |
" argument"; |
if (function.fParameters.size() != 1) { |
msg += "s"; |
} |
- msg += ", but found " + to_string((uint64_t) arguments.size()); |
+ msg += ", but found " + to_string(arguments.size()); |
fErrors.error(position, msg); |
return nullptr; |
} |
@@ -940,7 +938,7 @@ |
if (args.size() != 1) { |
fErrors.error(position, "invalid arguments to '" + type.description() + |
"' constructor, (expected exactly 1 argument, but found " + |
- to_string((uint64_t) args.size()) + ")"); |
+ to_string(args.size()) + ")"); |
} |
if (args[0]->fType == *fContext.fBool_Type) { |
std::unique_ptr<IntLiteral> zero(new IntLiteral(fContext, position, 0)); |