From 4b349c0f90c3f7b6a39171cec41cd98dcd0d88b7 Mon Sep 17 00:00:00 2001 From: Henry Wilson Date: Thu, 20 Sep 2018 22:41:43 +0100 Subject: Codechange: [core] Implement SmallVector using std::vector The public and protected interface to SmallVector are unchanged SmallVector now requires that items be default constructible This isn't an issue since some contained items were previously created uninitialized. Temporary default constructors are added to the following structs - SmallPair - SmallStackItem - GRFPresence Where vector is required, transition immediately to std::vector to avoid returning proxy object references. --- src/gamelog.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/gamelog.cpp') diff --git a/src/gamelog.cpp b/src/gamelog.cpp index 29910d7ad..1698dadad 100644 --- a/src/gamelog.cpp +++ b/src/gamelog.cpp @@ -178,6 +178,7 @@ struct GRFPresence{ bool was_missing; ///< Grf was missing during some gameload in the past GRFPresence(const GRFConfig *gc) : gc(gc), was_missing(false) {} + GRFPresence() = default; }; typedef SmallMap GrfIDMapping; -- cgit v1.2.3-54-g00ecf