Use rcp instead of rcp<T> where possible
This commit is contained in:
parent
62b729badd
commit
174a45cfe7
@ -52,7 +52,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rcp<T> & operator=(const rcp & other)
|
rcp & operator=(const rcp & other)
|
||||||
{
|
{
|
||||||
if (ptr != other.ptr)
|
if (ptr != other.ptr)
|
||||||
{
|
{
|
||||||
@ -75,7 +75,7 @@ public:
|
|||||||
other.ptr = nullptr;
|
other.ptr = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
rcp<T> & operator=(rcp && other) noexcept
|
rcp & operator=(rcp && other) noexcept
|
||||||
{
|
{
|
||||||
if (ptr != other.ptr)
|
if (ptr != other.ptr)
|
||||||
{
|
{
|
||||||
@ -132,12 +132,12 @@ public:
|
|||||||
return ptr != nullptr;
|
return ptr != nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool operator==(const rcp<T> & other) const
|
bool operator==(const rcp & other) const
|
||||||
{
|
{
|
||||||
return ptr == other.ptr;
|
return ptr == other.ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool operator!=(const rcp<T> & other) const
|
bool operator!=(const rcp & other) const
|
||||||
{
|
{
|
||||||
return ptr != other.ptr;
|
return ptr != other.ptr;
|
||||||
}
|
}
|
||||||
@ -153,7 +153,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename... Args>
|
template <typename... Args>
|
||||||
static rcp<T> create(Args&&... args)
|
static rcp create(Args&&... args)
|
||||||
{
|
{
|
||||||
return T::create(std::forward<Args>(args)...);
|
return T::create(std::forward<Args>(args)...);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user