diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2022-04-26 13:23:32 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2022-04-26 13:25:17 +0200 |
commit | fab731a9d4622b1ecd7dea01895d9fbaf83301ea (patch) | |
tree | d89fbd645c8961a5bd079eef2cc1e54c84784cd2 /src/libexpr/attr-set.hh | |
parent | 29e52194a8492d9eea8f7425ea0a2660cfdb6aef (diff) |
Don't pass Symbol by reference
Since Symbol is just an integer, passing it by const reference is
never advantageous.
Diffstat (limited to 'src/libexpr/attr-set.hh')
-rw-r--r-- | src/libexpr/attr-set.hh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libexpr/attr-set.hh b/src/libexpr/attr-set.hh index 31251efc4..dcc73b506 100644 --- a/src/libexpr/attr-set.hh +++ b/src/libexpr/attr-set.hh @@ -66,7 +66,7 @@ public: attrs[size_++] = attr; } - iterator find(const Symbol & name) + iterator find(Symbol name) { Attr key(name, 0); iterator i = std::lower_bound(begin(), end(), key); @@ -74,7 +74,7 @@ public: return end(); } - Attr * get(const Symbol & name) + Attr * get(Symbol name) { Attr key(name, 0); iterator i = std::lower_bound(begin(), end(), key); @@ -143,7 +143,7 @@ public: bindings->push_back(attr); } - Value & alloc(const Symbol & name, PosIdx pos = noPos); + Value & alloc(Symbol name, PosIdx pos = noPos); Value & alloc(std::string_view name, PosIdx pos = noPos); |