mirror of
https://github.com/zeek/zeek.git
synced 2025-10-15 04:58:21 +00:00
Adjust various reaching-def move/reference semantics
Nothing that important, just changing things to what is hypothetically more efficient in general.
This commit is contained in:
parent
1f7580db65
commit
36f27a0d01
6 changed files with 27 additions and 29 deletions
|
@ -39,7 +39,7 @@ public:
|
|||
ReachingDefs();
|
||||
|
||||
// Create a new object, using the RDs from another object.
|
||||
ReachingDefs(RDPtr& rd);
|
||||
ReachingDefs(RDPtr rd);
|
||||
|
||||
~ReachingDefs();
|
||||
|
||||
|
@ -208,9 +208,9 @@ public:
|
|||
RDPtr& FindRDs(const Obj* o) const;
|
||||
|
||||
// Associates the given RDs with the given AST node.
|
||||
void SetRDs(const Obj* o, RDPtr& rd)
|
||||
void SetRDs(const Obj* o, RDPtr rd)
|
||||
{
|
||||
auto new_rd = make_intrusive<ReachingDefs>(rd);
|
||||
auto new_rd = make_intrusive<ReachingDefs>(std::move(rd));
|
||||
(*a_i)[o] = new_rd;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue