video_core: texture_cache: proper `UniqueImage` class movers

This commit is contained in:
psucien 2024-05-29 17:17:24 +02:00
parent a67b8f7a0b
commit 055dec1149
1 changed files with 6 additions and 1 deletions

View File

@ -53,9 +53,14 @@ struct UniqueImage {
UniqueImage(const UniqueImage&) = delete;
UniqueImage& operator=(const UniqueImage&) = delete;
UniqueImage(UniqueImage&& other) : image{std::exchange(other.image, VK_NULL_HANDLE)} {}
UniqueImage(UniqueImage&& other)
: image{std::exchange(other.image, VK_NULL_HANDLE)},
allocator{std::exchange(other.allocator, VK_NULL_HANDLE)},
allocation{std::exchange(other.allocation, VK_NULL_HANDLE)} {}
UniqueImage& operator=(UniqueImage&& other) {
image = std::exchange(other.image, VK_NULL_HANDLE);
allocator = std::exchange(other.allocator, VK_NULL_HANDLE);
allocation = std::exchange(other.allocation, VK_NULL_HANDLE);
return *this;
}