diff options
author | Ethan Nicholas <ethannicholas@google.com> | 2017-06-02 10:16:28 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-06-02 15:11:19 +0000 |
commit | b4dc419f0bc3140cb4e0f5a2fe4db46c4306df86 (patch) | |
tree | b47f7b59766c82d0a8c1edacf74e62650346738f /src/sksl/ir/SkSLVarDeclarationsStatement.h | |
parent | 7e910df7f133e80293117bdd069ed25998d10f8c (diff) |
Re-land "Fixed an issue with sksl variable declarations"
This reverts commit affa6a3da87e9ea85f1d4fe3137b5bccbbc56f92.
Bug: skia:
Change-Id: I5864830e31acbf786f3ea7ae91f42f10aae6d855
Reviewed-on: https://skia-review.googlesource.com/18459
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'src/sksl/ir/SkSLVarDeclarationsStatement.h')
-rw-r--r-- | src/sksl/ir/SkSLVarDeclarationsStatement.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/sksl/ir/SkSLVarDeclarationsStatement.h b/src/sksl/ir/SkSLVarDeclarationsStatement.h index 50365decc1..ab6753610f 100644 --- a/src/sksl/ir/SkSLVarDeclarationsStatement.h +++ b/src/sksl/ir/SkSLVarDeclarationsStatement.h @@ -21,6 +21,15 @@ struct VarDeclarationsStatement : public Statement { : INHERITED(decl->fPosition, kVarDeclarations_Kind) , fDeclaration(std::move(decl)) {} + bool isEmpty() const override { + for (const auto& s : fDeclaration->fVars) { + if (!s->isEmpty()) { + return false; + } + } + return true; + } + String description() const override { return fDeclaration->description(); } |