commit | 2e8a4b54cd57ba15256eb90af15f249290f04f2a | [log] [tgz] |
---|---|---|
author | Giuliano Procida <gprocida@google.com> | Tue May 05 19:16:18 2020 +0100 |
committer | Dodji Seketeli <dodji@redhat.com> | Wed May 13 10:50:25 2020 +0200 |
tree | f6056d6981223bc62eafcd96350ef73267d55772 | |
parent | 101493793d8b011d378f784de22f24d3c3d0aec9 [diff] |
Let std::unordered_map::operator[] insert keys. This patch replaces some verbose code with one-liners that rely on std::unordered_map::operator[] to insert a missing key and return a reference to the default-constructed inserted value. * src/abg-reader.cc (read_context::key_type_decl): Rely on std::unordered_map::operator[] to create map entries if they are missing. (build_elf_symbol_db): Ditto. Signed-off-by: Giuliano Procida <gprocida@google.com>