Fixed missing noexcept
Former-commit-id: 58276c2ba77d0242fade3b29034f28871b48a987
This commit is contained in:
parent
6507e1ed2d
commit
c6f89757b6
|
|
@ -20,7 +20,7 @@ class NzResourceRef
|
||||||
NzResourceRef() = default;
|
NzResourceRef() = default;
|
||||||
NzResourceRef(T* resource);
|
NzResourceRef(T* resource);
|
||||||
NzResourceRef(const NzResourceRef& ref);
|
NzResourceRef(const NzResourceRef& ref);
|
||||||
NzResourceRef(NzResourceRef&& ref);
|
NzResourceRef(NzResourceRef&& ref) noexcept;
|
||||||
~NzResourceRef();
|
~NzResourceRef();
|
||||||
|
|
||||||
bool IsValid() const;
|
bool IsValid() const;
|
||||||
|
|
@ -34,7 +34,7 @@ class NzResourceRef
|
||||||
|
|
||||||
NzResourceRef& operator=(T* resource);
|
NzResourceRef& operator=(T* resource);
|
||||||
NzResourceRef& operator=(const NzResourceRef& ref);
|
NzResourceRef& operator=(const NzResourceRef& ref);
|
||||||
NzResourceRef& operator=(NzResourceRef&& ref);
|
NzResourceRef& operator=(NzResourceRef&& ref) noexcept;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
T* m_resource = nullptr;
|
T* m_resource = nullptr;
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ m_resource(ref.m_resource)
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
NzResourceRef<T>::NzResourceRef(NzResourceRef&& ref) :
|
NzResourceRef<T>::NzResourceRef(NzResourceRef&& ref) noexcept :
|
||||||
m_resource(ref.m_resource)
|
m_resource(ref.m_resource)
|
||||||
{
|
{
|
||||||
ref.m_resource = nullptr; // On vole la référence
|
ref.m_resource = nullptr; // On vole la référence
|
||||||
|
|
@ -113,7 +113,7 @@ NzResourceRef<T>& NzResourceRef<T>::operator=(const NzResourceRef& ref)
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
NzResourceRef<T>& NzResourceRef<T>::operator=(NzResourceRef&& ref)
|
NzResourceRef<T>& NzResourceRef<T>::operator=(NzResourceRef&& ref) noexcept
|
||||||
{
|
{
|
||||||
Reset();
|
Reset();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue