فهرست منبع

vulkan/wrapper: Avoid unnecessary copy in EnumerateInstanceExtensionProperties()

Given this is implicitly creating a std::optional, we can move the
vector into it.
Lioncash 6 سال پیش
والد
کامیت
167d36ec3c
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      src/video_core/renderer_vulkan/wrapper.cpp

+ 1 - 1
src/video_core/renderer_vulkan/wrapper.cpp

@@ -786,7 +786,7 @@ std::optional<std::vector<VkExtensionProperties>> EnumerateInstanceExtensionProp
         VK_SUCCESS) {
         return std::nullopt;
     }
-    return properties;
+    return std::move(properties);
 }
 
 std::optional<std::vector<VkLayerProperties>> EnumerateInstanceLayerProperties(