aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sksl/ir/SkSLVarDeclarations.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/sksl/ir/SkSLVarDeclarations.h')
-rw-r--r--src/sksl/ir/SkSLVarDeclarations.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/sksl/ir/SkSLVarDeclarations.h b/src/sksl/ir/SkSLVarDeclarations.h
index e64a874d69..295c0b6997 100644
--- a/src/sksl/ir/SkSLVarDeclarations.h
+++ b/src/sksl/ir/SkSLVarDeclarations.h
@@ -27,8 +27,8 @@ struct VarDeclaration {
, fSizes(std::move(sizes))
, fValue(std::move(value)) {}
- std::string description() const {
- std::string result = fVar->fName;
+ SkString description() const {
+ SkString result = fVar->fName;
for (const auto& size : fSizes) {
if (size) {
result += "[" + size->description() + "]";
@@ -57,13 +57,12 @@ struct VarDeclarations : public ProgramElement {
, fBaseType(*baseType)
, fVars(std::move(vars)) {}
- std::string description() const override {
+ SkString description() const override {
if (!fVars.size()) {
- return "";
+ return SkString();
}
- std::string result = fVars[0].fVar->fModifiers.description() + fBaseType.description() +
- " ";
- std::string separator = "";
+ SkString result = fVars[0].fVar->fModifiers.description() + fBaseType.description() + " ";
+ SkString separator;
for (const auto& var : fVars) {
result += separator;
separator = ", ";