diff options
author | Daniel Wirtz <dcode@dcode.io> | 2020-08-20 21:35:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-20 12:35:14 -0700 |
commit | af87f23744477b034dcb1c59af2a1a208becab23 (patch) | |
tree | 1f99d29f17191ecdd121cd15e455cea90b38d303 /src/passes/Print.cpp | |
parent | a18d30fb42838f2e4002338d6e57a25322f9e422 (diff) | |
download | binaryen-af87f23744477b034dcb1c59af2a1a208becab23.tar.gz binaryen-af87f23744477b034dcb1c59af2a1a208becab23.tar.bz2 binaryen-af87f23744477b034dcb1c59af2a1a208becab23.zip |
Use const modifier when dealing with types (#3064)
Since they make the code clearer and more self-documenting.
Diffstat (limited to 'src/passes/Print.cpp')
-rw-r--r-- | src/passes/Print.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index ba4e022e0..d03201f1a 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -69,7 +69,7 @@ static std::ostream& operator<<(std::ostream& o, const SExprType& localType) { if (type.isMulti()) { o << '('; auto sep = ""; - for (auto& t : type) { + for (const auto& t : type) { o << sep << t; sep = " "; } @@ -92,7 +92,7 @@ std::ostream& operator<<(std::ostream& os, SigName sigName) { os << "none"; } else { auto sep = ""; - for (auto& t : type) { + for (const auto& t : type) { os << sep << t; sep = "_"; } @@ -2170,7 +2170,7 @@ struct PrintSExpression : public OverriddenVisitor<PrintSExpression> { } if (curr->sig.params.size() > 0) { Index i = 0; - for (auto& param : curr->sig.params) { + for (const auto& param : curr->sig.params) { o << maybeSpace; o << '('; printMinor(o, "param "); |