Преглед изворни кода

vk_buffer_cache: Silence implicit cast warnings

ReinUsesLisp пре 5 година
родитељ
комит
3ab5bf6454
1 измењених фајлова са 3 додато и 2 уклоњено
  1. 3 2
      src/video_core/renderer_vulkan/vk_buffer_cache.cpp

+ 3 - 2
src/video_core/renderer_vulkan/vk_buffer_cache.cpp

@@ -55,8 +55,9 @@ size_t BytesPerIndex(VkIndexType index_type) {
 template <typename T>
 std::array<T, 6> MakeQuadIndices(u32 quad, u32 first) {
     std::array<T, 6> indices{0, 1, 2, 0, 2, 3};
-    std::ranges::transform(indices, indices.begin(),
-                           [quad, first](u32 index) { return first + index + quad * 4; });
+    for (T& index : indices) {
+        index = static_cast<T>(first + index + quad * 4);
+    }
     return indices;
 }
 } // Anonymous namespace