Remove useless inline

This commit is contained in:
Lynix 2020-03-05 22:35:00 +01:00
parent 2b3241f354
commit c1a01c4183
2 changed files with 18 additions and 18 deletions

View File

@ -19,23 +19,23 @@ namespace Nz
class DeviceObject class DeviceObject
{ {
public: public:
inline DeviceObject(); DeviceObject();
DeviceObject(const DeviceObject&) = delete; DeviceObject(const DeviceObject&) = delete;
inline DeviceObject(DeviceObject&& object); DeviceObject(DeviceObject&& object);
inline ~DeviceObject(); ~DeviceObject();
inline bool Create(DeviceHandle device, const CreateInfo& createInfo, const VkAllocationCallbacks* allocator = nullptr); bool Create(DeviceHandle device, const CreateInfo& createInfo, const VkAllocationCallbacks* allocator = nullptr);
inline void Destroy(); void Destroy();
inline bool IsValid() const; bool IsValid() const;
inline const DeviceHandle& GetDevice() const; const DeviceHandle& GetDevice() const;
inline VkResult GetLastErrorCode() const; VkResult GetLastErrorCode() const;
DeviceObject& operator=(const DeviceObject&) = delete; DeviceObject& operator=(const DeviceObject&) = delete;
DeviceObject& operator=(DeviceObject&&) = delete; DeviceObject& operator=(DeviceObject&&) = delete;
inline operator VkType() const; operator VkType() const;
protected: protected:
DeviceHandle m_device; DeviceHandle m_device;

View File

@ -14,13 +14,13 @@ namespace Nz
namespace Vk namespace Vk
{ {
template<typename C, typename VkType, typename CreateInfo> template<typename C, typename VkType, typename CreateInfo>
inline DeviceObject<C, VkType, CreateInfo>::DeviceObject() : DeviceObject<C, VkType, CreateInfo>::DeviceObject() :
m_handle(VK_NULL_HANDLE) m_handle(VK_NULL_HANDLE)
{ {
} }
template<typename C, typename VkType, typename CreateInfo> template<typename C, typename VkType, typename CreateInfo>
inline DeviceObject<C, VkType, CreateInfo>::DeviceObject(DeviceObject&& object) : DeviceObject<C, VkType, CreateInfo>::DeviceObject(DeviceObject&& object) :
m_device(std::move(object.m_device)), m_device(std::move(object.m_device)),
m_allocator(object.m_allocator), m_allocator(object.m_allocator),
m_handle(object.m_handle), m_handle(object.m_handle),
@ -30,13 +30,13 @@ namespace Nz
} }
template<typename C, typename VkType, typename CreateInfo> template<typename C, typename VkType, typename CreateInfo>
inline DeviceObject<C, VkType, CreateInfo>::~DeviceObject() DeviceObject<C, VkType, CreateInfo>::~DeviceObject()
{ {
Destroy(); Destroy();
} }
template<typename C, typename VkType, typename CreateInfo> template<typename C, typename VkType, typename CreateInfo>
inline bool DeviceObject<C, VkType, CreateInfo>::Create(DeviceHandle device, const CreateInfo& createInfo, const VkAllocationCallbacks* allocator) bool DeviceObject<C, VkType, CreateInfo>::Create(DeviceHandle device, const CreateInfo& createInfo, const VkAllocationCallbacks* allocator)
{ {
m_device = std::move(device); m_device = std::move(device);
m_lastErrorCode = C::CreateHelper(m_device, &createInfo, allocator, &m_handle); m_lastErrorCode = C::CreateHelper(m_device, &createInfo, allocator, &m_handle);
@ -56,7 +56,7 @@ namespace Nz
} }
template<typename C, typename VkType, typename CreateInfo> template<typename C, typename VkType, typename CreateInfo>
inline void DeviceObject<C, VkType, CreateInfo>::Destroy() void DeviceObject<C, VkType, CreateInfo>::Destroy()
{ {
if (IsValid()) if (IsValid())
{ {
@ -66,25 +66,25 @@ namespace Nz
} }
template<typename C, typename VkType, typename CreateInfo> template<typename C, typename VkType, typename CreateInfo>
inline bool DeviceObject<C, VkType, CreateInfo>::IsValid() const bool DeviceObject<C, VkType, CreateInfo>::IsValid() const
{ {
return m_handle != VK_NULL_HANDLE; return m_handle != VK_NULL_HANDLE;
} }
template<typename C, typename VkType, typename CreateInfo> template<typename C, typename VkType, typename CreateInfo>
inline const DeviceHandle& DeviceObject<C, VkType, CreateInfo>::GetDevice() const const DeviceHandle& DeviceObject<C, VkType, CreateInfo>::GetDevice() const
{ {
return m_device; return m_device;
} }
template<typename C, typename VkType, typename CreateInfo> template<typename C, typename VkType, typename CreateInfo>
inline VkResult DeviceObject<C, VkType, CreateInfo>::GetLastErrorCode() const VkResult DeviceObject<C, VkType, CreateInfo>::GetLastErrorCode() const
{ {
return m_lastErrorCode; return m_lastErrorCode;
} }
template<typename C, typename VkType, typename CreateInfo> template<typename C, typename VkType, typename CreateInfo>
inline DeviceObject<C, VkType, CreateInfo>::operator VkType() const DeviceObject<C, VkType, CreateInfo>::operator VkType() const
{ {
return m_handle; return m_handle;
} }