aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sksl/ir/SkSLLayout.h
diff options
context:
space:
mode:
authorGravatar Ethan Nicholas <ethannicholas@google.com>2016-11-21 10:39:35 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-11-21 17:14:43 +0000
commit9e1138d56665d13641f8805cd72ae81adc255f79 (patch)
tree1c94ded7cff10f5f62233d1de83c3d30ad0a2893 /src/sksl/ir/SkSLLayout.h
parente54d4cefb7864a575c01894b2e5e0df16978c6e6 (diff)
re-land of switched skslc from std::string to SkString
BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5084 Change-Id: Ib21c30afc0d8483392b417e660b7fecfcc30e617 Reviewed-on: https://skia-review.googlesource.com/5084 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'src/sksl/ir/SkSLLayout.h')
-rw-r--r--src/sksl/ir/SkSLLayout.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sksl/ir/SkSLLayout.h b/src/sksl/ir/SkSLLayout.h
index 4cfd1a2771..7359262c96 100644
--- a/src/sksl/ir/SkSLLayout.h
+++ b/src/sksl/ir/SkSLLayout.h
@@ -50,9 +50,9 @@ struct Layout {
, fBlendSupportAllEquations(false)
, fFormat(ASTLayout::Format::kUnspecified) {}
- std::string description() const {
- std::string result;
- std::string separator;
+ SkString description() const {
+ SkString result;
+ SkString separator;
if (fLocation >= 0) {
result += separator + "location = " + to_string(fLocation);
separator = ", ";
@@ -89,7 +89,7 @@ struct Layout {
result += separator + ASTLayout::FormatToStr(fFormat);
separator = ", ";
}
- if (result.length() > 0) {
+ if (result.size() > 0) {
result = "layout (" + result + ")";
}
return result;