diff options
author | Sam Clegg <sbc@chromium.org> | 2022-11-15 09:18:19 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-15 17:18:19 +0000 |
commit | 7566af8c129d92720e91472adc63dd308f751a9d (patch) | |
tree | 11d0696ae4f55b4fbcdb0c2456194e1e0681ebdd /include/wabt/wast-parser.h | |
parent | d3e4ab30720c48d0c019fa521d70362b1bdd2bae (diff) | |
download | wabt-7566af8c129d92720e91472adc63dd308f751a9d.tar.gz wabt-7566af8c129d92720e91472adc63dd308f751a9d.tar.bz2 wabt-7566af8c129d92720e91472adc63dd308f751a9d.zip |
Switch from `typedef` to using `using` in C++ code. NFC (#2066)
This is more modern and (IMHO) easier to read than that old C typedef
syntax.
Diffstat (limited to 'include/wabt/wast-parser.h')
-rw-r--r-- | include/wabt/wast-parser.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/wabt/wast-parser.h b/include/wabt/wast-parser.h index 3b0e3852..23194a7e 100644 --- a/include/wabt/wast-parser.h +++ b/include/wabt/wast-parser.h @@ -36,7 +36,7 @@ struct WastParseOptions { bool debug_parsing = false; }; -typedef std::array<TokenType, 2> TokenTypePair; +using TokenTypePair = std::array<TokenType, 2>; class WastParser { public: @@ -114,7 +114,7 @@ class WastParser { // token (used for printing better error messages). void ConsumeIfLpar() { Match(TokenType::Lpar); } - typedef bool SynchronizeFunc(TokenTypePair pair); + using SynchronizeFunc = bool(*)(TokenTypePair pair); // Attempt to synchronize the token stream by dropping tokens until the // SynchronizeFunc returns true, or until a token limit is reached. This |