Răsfoiți Sursa

map_interval: Change field order to address uninitialized field warning

Clang complains about `new_chunk`'s constructor using the
then-uninitialized `first_chunk` (even though it's just to get a pointer
into it).
comex 5 ani în urmă
părinte
comite
b8fbf6969c
1 a modificat fișierele cu 2 adăugiri și 1 ștergeri
  1. 2 1
      src/video_core/buffer_cache/map_interval.h

+ 2 - 1
src/video_core/buffer_cache/map_interval.h

@@ -84,9 +84,10 @@ private:
     void FillFreeList(Chunk& chunk);
 
     std::vector<MapInterval*> free_list;
-    std::unique_ptr<Chunk>* new_chunk = &first_chunk.next;
 
     Chunk first_chunk;
+
+    std::unique_ptr<Chunk>* new_chunk = &first_chunk.next;
 };
 
 } // namespace VideoCommon