switched skslc from std::string to SkString
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4977
Change-Id: I15e24963b09b719a2c07da67745114f5ac66cee8
Reviewed-on: https://skia-review.googlesource.com/4977
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
diff --git a/src/sksl/ir/SkSLVarDeclarations.h b/src/sksl/ir/SkSLVarDeclarations.h
index e64a874..295c0b6 100644
--- a/src/sksl/ir/SkSLVarDeclarations.h
+++ b/src/sksl/ir/SkSLVarDeclarations.h
@@ -27,8 +27,8 @@
, 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 @@
, 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 = ", ";