mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-10 13:48:40 +00:00
video_core: texture_cache: proper UniqueImage class movers
This commit is contained in:
@@ -53,9 +53,14 @@ struct UniqueImage {
|
|||||||
UniqueImage(const UniqueImage&) = delete;
|
UniqueImage(const UniqueImage&) = delete;
|
||||||
UniqueImage& operator=(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) {
|
UniqueImage& operator=(UniqueImage&& other) {
|
||||||
image = std::exchange(other.image, VK_NULL_HANDLE);
|
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;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user