mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Use template cast
This commit is contained in:
committed by
Vinnie Falco
parent
ef6e381de3
commit
ac0142a49e
@@ -53,7 +53,7 @@ public:
|
|||||||
|
|
||||||
template <bool OtherIsConst>
|
template <bool OtherIsConst>
|
||||||
BufferType (BufferType <OtherIsConst> const& other)
|
BufferType (BufferType <OtherIsConst> const& other)
|
||||||
: m_data (other.cast <pointer_type> ())
|
: m_data (other.template cast <pointer_type> ())
|
||||||
, m_size (other.size ())
|
, m_size (other.size ())
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -75,7 +75,7 @@ public:
|
|||||||
BufferType& operator= (
|
BufferType& operator= (
|
||||||
BufferType <OtherIsConst> const& other) noexcept
|
BufferType <OtherIsConst> const& other) noexcept
|
||||||
{
|
{
|
||||||
m_data = other.cast <pointer_type> ();
|
m_data = other.template cast <pointer_type> ();
|
||||||
m_size = other.size ();
|
m_size = other.size ();
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ public:
|
|||||||
|
|
||||||
template <class U>
|
template <class U>
|
||||||
SharedPtr (SharedPtr <U>&& sp) noexcept
|
SharedPtr (SharedPtr <U>&& sp) noexcept
|
||||||
: m_p (sp.swap <U> (nullptr))
|
: m_p (sp.template swap <U> (nullptr))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
/** @} */
|
/** @} */
|
||||||
@@ -185,7 +185,7 @@ public:
|
|||||||
template <class U>
|
template <class U>
|
||||||
SharedPtr& operator= (SharedPtr <U>&& sp)
|
SharedPtr& operator= (SharedPtr <U>&& sp)
|
||||||
{
|
{
|
||||||
return assign (sp.swap <U> (nullptr));
|
return assign (sp.template swap <U> (nullptr));
|
||||||
}
|
}
|
||||||
/** @} */
|
/** @} */
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user