aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/attr-set.hh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2022-04-26 13:23:32 +0200
committerEelco Dolstra <edolstra@gmail.com>2022-04-26 13:25:17 +0200
commitfab731a9d4622b1ecd7dea01895d9fbaf83301ea (patch)
treed89fbd645c8961a5bd079eef2cc1e54c84784cd2 /src/libexpr/attr-set.hh
parent29e52194a8492d9eea8f7425ea0a2660cfdb6aef (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.hh6
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);