Skip to content

Commit 507b16a

Browse files
committed
Add missing &
I'm not entirely sure how these were missed, but there were still ref and unref calls I wasn't expecting on a hot path. This takes a further five seconds off the startup time of the app I'm working on, so between this and the previous PR, that's nearly half the launch time gone.
1 parent ae2f794 commit 507b16a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

include/vsg/core/observer_ptr.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ namespace vsg
136136
}
137137

138138
template<class R>
139-
bool operator<(const vsg::ref_ptr<R> rhs) const
139+
bool operator<(const vsg::ref_ptr<R>& rhs) const
140140
{
141141
if (rhs.get() < _ptr)
142142
return true;
@@ -146,7 +146,7 @@ namespace vsg
146146
}
147147

148148
template<class R>
149-
bool operator==(const vsg::ref_ptr<R> rhs) const
149+
bool operator==(const vsg::ref_ptr<R>& rhs) const
150150
{
151151
if (rhs.get() != _ptr)
152152
return false;
@@ -156,7 +156,7 @@ namespace vsg
156156
}
157157

158158
template<class R>
159-
bool operator!=(const vsg::ref_ptr<R> rhs) const
159+
bool operator!=(const vsg::ref_ptr<R>& rhs) const
160160
{
161161
if (rhs.get() != _ptr)
162162
return true;

0 commit comments

Comments
 (0)