summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2022-05-17 08:37:04 -0700
committerGitHub <noreply@github.com>2022-05-17 08:37:04 -0700
commit2103ff82c3ccbd6f8ee3c6bad1842f39d3e1d072 (patch)
tree67a92aae8aca078c13d545da42a22e88a8e0e902 /src
parentb2395815380a7a7cdcaa4d6e16efc784c10fd5ce (diff)
downloadbinaryen-2103ff82c3ccbd6f8ee3c6bad1842f39d3e1d072.tar.gz
binaryen-2103ff82c3ccbd6f8ee3c6bad1842f39d3e1d072.tar.bz2
binaryen-2103ff82c3ccbd6f8ee3c6bad1842f39d3e1d072.zip
[NFC] Make InsertOrderedMap::insert's param const (#4669)
Being a const reference allows writing insert({a, b}), which will be useful in a future PR, and there is no reason to actually update the reference.
Diffstat (limited to 'src')
-rw-r--r--src/support/insert_ordered.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/support/insert_ordered.h b/src/support/insert_ordered.h
index 12c98a3b2..6b0f54968 100644
--- a/src/support/insert_ordered.h
+++ b/src/support/insert_ordered.h
@@ -96,7 +96,7 @@ template<typename Key, typename T> struct InsertOrderedMap {
const_iterator begin() const { return List.begin(); }
const_iterator end() const { return List.end(); }
- std::pair<iterator, bool> insert(std::pair<const Key, T>& kv) {
+ std::pair<iterator, bool> insert(const std::pair<const Key, T>& kv) {
// Try inserting with a placeholder list iterator.
auto inserted = Map.insert({kv.first, List.end()});
if (inserted.second) {