Don't pass Symbol by reference
Since Symbol is just an integer, passing it by const reference is never advantageous.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user