diff --git a/libyul/Object.cpp b/libyul/Object.cpp index 7833ba759..e357e1561 100644 --- a/libyul/Object.cpp +++ b/libyul/Object.cpp @@ -145,7 +145,11 @@ set Object::qualifiedDataNames() const return qualifiedNames; } -void Object::traverseObjectTree(Object const* _object, YulString _qualifiedName, std::function _visitor) +void Object::traverseObjectTree( + Object const* _object, + YulString _qualifiedName, + std::function const& _visitor +) { yulAssert(!_qualifiedName.empty(), ""); diff --git a/libyul/Object.h b/libyul/Object.h index d37d6c70b..131b2b5d5 100644 --- a/libyul/Object.h +++ b/libyul/Object.h @@ -122,7 +122,7 @@ public: static void traverseObjectTree( Object const* _object, YulString _qualifiedName, - std::function _visitor + std::function const& _visitor ); /// sub id for object if it is subobject of another object, max value if it is not subobject