summaryrefslogtreecommitdiff
path: root/include/wabt/binding-hash.h
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2022-11-15 09:18:19 -0800
committerGitHub <noreply@github.com>2022-11-15 17:18:19 +0000
commit7566af8c129d92720e91472adc63dd308f751a9d (patch)
tree11d0696ae4f55b4fbcdb0c2456194e1e0681ebdd /include/wabt/binding-hash.h
parentd3e4ab30720c48d0c019fa521d70362b1bdd2bae (diff)
downloadwabt-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/binding-hash.h')
-rw-r--r--include/wabt/binding-hash.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/wabt/binding-hash.h b/include/wabt/binding-hash.h
index f6b948fc..5d43cd72 100644
--- a/include/wabt/binding-hash.h
+++ b/include/wabt/binding-hash.h
@@ -42,8 +42,8 @@ struct Binding {
// object through a pointer to std::unordered_multimap.
class BindingHash : public std::unordered_multimap<std::string, Binding> {
public:
- typedef std::function<void(const value_type&, const value_type&)>
- DuplicateCallback;
+ using DuplicateCallback =
+ std::function<void(const value_type&, const value_type&)>;
void FindDuplicates(DuplicateCallback callback) const;
@@ -59,7 +59,7 @@ class BindingHash : public std::unordered_multimap<std::string, Binding> {
}
private:
- typedef std::vector<const value_type*> ValueTypeVector;
+ using ValueTypeVector = std::vector<const value_type*>;
void CreateDuplicatesVector(ValueTypeVector* out_duplicates) const;
void SortDuplicatesVectorByLocation(ValueTypeVector* duplicates) const;