From 055dec11499f7f8e7d607642225a8daa5dbbd04e Mon Sep 17 00:00:00 2001 From: psucien Date: Wed, 29 May 2024 17:17:24 +0200 Subject: [PATCH] video_core: texture_cache: proper `UniqueImage` class movers --- src/video_core/texture_cache/image.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/video_core/texture_cache/image.h b/src/video_core/texture_cache/image.h index 1f29d0d4..74c9cf5d 100644 --- a/src/video_core/texture_cache/image.h +++ b/src/video_core/texture_cache/image.h @@ -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; }