fix(renderer/vk/raii): special member function issues
Some checks reported errors
continuous-integration/drone/push Build was killed
Some checks reported errors
continuous-integration/drone/push Build was killed
This commit is contained in:
parent
7ee4381bbf
commit
604ee5e6a1
1 changed files with 25 additions and 3 deletions
|
|
@ -4,7 +4,7 @@
|
||||||
#include <renderer/backend/vk/vulkan.hpp>
|
#include <renderer/backend/vk/vulkan.hpp>
|
||||||
|
|
||||||
|
|
||||||
namespace lt::renderer::vk::raii { // NOLINTBEGIN(cppcoreguidelines-special-member-functions)
|
namespace lt::renderer::vk::raii {
|
||||||
|
|
||||||
class DebugMessenger
|
class DebugMessenger
|
||||||
{
|
{
|
||||||
|
|
@ -23,13 +23,20 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DebugMessenger(DebugMessenger &&) = default;
|
||||||
|
|
||||||
|
DebugMessenger(const DebugMessenger &) = delete;
|
||||||
|
|
||||||
|
auto operator=(DebugMessenger &&) -> DebugMessenger & = default;
|
||||||
|
|
||||||
|
auto operator=(const DebugMessenger &) -> DebugMessenger & = delete;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
memory::NullOnMove<Instance *> m_instance {};
|
memory::NullOnMove<Instance *> m_instance {};
|
||||||
|
|
||||||
VkDebugUtilsMessengerEXT m_object;
|
VkDebugUtilsMessengerEXT m_object;
|
||||||
};
|
};
|
||||||
|
|
||||||
// NOLINTNEXTLINE(cppcoreguidelines-special-member-functions)
|
|
||||||
class Buffer
|
class Buffer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
@ -47,6 +54,14 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Buffer(Buffer &&) = default;
|
||||||
|
|
||||||
|
Buffer(const Buffer &) = delete;
|
||||||
|
|
||||||
|
auto operator=(Buffer &&) -> Buffer & = default;
|
||||||
|
|
||||||
|
auto operator=(const Buffer &) -> Buffer & = delete;
|
||||||
|
|
||||||
[[nodiscard]] auto operator*() const -> VkBuffer
|
[[nodiscard]] auto operator*() const -> VkBuffer
|
||||||
{
|
{
|
||||||
return m_object;
|
return m_object;
|
||||||
|
|
@ -81,6 +96,14 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Memory(Memory &&) = default;
|
||||||
|
|
||||||
|
Memory(const Memory &) = delete;
|
||||||
|
|
||||||
|
auto operator=(Memory &&) -> Memory & = default;
|
||||||
|
|
||||||
|
auto operator=(const Memory &) -> Memory & = delete;
|
||||||
|
|
||||||
[[nodiscard]] auto operator*() const -> VkDeviceMemory
|
[[nodiscard]] auto operator*() const -> VkDeviceMemory
|
||||||
{
|
{
|
||||||
return m_object;
|
return m_object;
|
||||||
|
|
@ -98,5 +121,4 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// NOLINTEND(cppcoreguidelines-special-member-functions)
|
|
||||||
} // namespace lt::renderer::vk::raii
|
} // namespace lt::renderer::vk::raii
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue