diff options
author | Sam Clegg <sbc@chromium.org> | 2022-11-15 10:02:27 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-15 18:02:27 +0000 |
commit | 59cbdd818dc3397a823a37e9821fd32f4522b2fc (patch) | |
tree | 58470bfc11591d2e70f1b79645061c1a23beb75d /src/emscripten-optimizer | |
parent | 236f12f7df64f10e1238bf2d66b1216f700b15df (diff) | |
download | binaryen-59cbdd818dc3397a823a37e9821fd32f4522b2fc.tar.gz binaryen-59cbdd818dc3397a823a37e9821fd32f4522b2fc.tar.bz2 binaryen-59cbdd818dc3397a823a37e9821fd32f4522b2fc.zip |
Switch from `typedef` to `using` in C++ code. NFC (#5258)
This is more modern and (IMHO) easier to read than that old C typedef
syntax.
Diffstat (limited to 'src/emscripten-optimizer')
-rw-r--r-- | src/emscripten-optimizer/parser.h | 2 | ||||
-rw-r--r-- | src/emscripten-optimizer/simple_ast.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/emscripten-optimizer/parser.h b/src/emscripten-optimizer/parser.h index 8c3f36427..f1d472863 100644 --- a/src/emscripten-optimizer/parser.h +++ b/src/emscripten-optimizer/parser.h @@ -426,7 +426,7 @@ template<class NodeRef, class Builder> class Parser { // This is a list of the current stack of node-operator-node-operator-etc. // this works by each parseExpression call appending to the vector; then // recursing out, and the toplevel sorts it all - typedef std::vector<ExpressionElement> ExpressionParts; + using ExpressionParts = std::vector<ExpressionElement>; std::vector<ExpressionParts> expressionPartsStack; // Parses an element in a list of such elements, e.g. list of statements in a diff --git a/src/emscripten-optimizer/simple_ast.h b/src/emscripten-optimizer/simple_ast.h index 60399d6d2..eb43209cc 100644 --- a/src/emscripten-optimizer/simple_ast.h +++ b/src/emscripten-optimizer/simple_ast.h @@ -120,7 +120,7 @@ struct Value { Type type = Null; - typedef std::unordered_map<IString, Ref> ObjectStorage; + using ObjectStorage = std::unordered_map<IString, Ref>; // MSVC does not allow unrestricted unions: // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2544.pdf |