Procházet zdrojové kódy

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 před 5 roky
rodič
revize
b8fbf6969c
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  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