From 123de7fdf795d7962a0fd2ca347bca013e67080f Mon Sep 17 00:00:00 2001 From: Pauli Date: Fri, 22 Jun 2018 15:51:03 +0300 Subject: [PATCH] Use constexpr to prevent attempts of linking static variable --- library/include/modules/MapCache.h | 2 +- library/modules/MapCache.cpp | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/library/include/modules/MapCache.h b/library/include/modules/MapCache.h index 73a91d972..70ba0a858 100644 --- a/library/include/modules/MapCache.h +++ b/library/include/modules/MapCache.h @@ -55,7 +55,7 @@ class Block; struct BiomeInfo { // Determined by the 4-bit index in the designation bitfield - static const unsigned MAX_LAYERS = 16; + static constexpr unsigned MAX_LAYERS = 16; df::coord2d pos; int default_soil, default_stone, lava_stone; diff --git a/library/modules/MapCache.cpp b/library/modules/MapCache.cpp index d5c2e6c81..85df6156f 100644 --- a/library/modules/MapCache.cpp +++ b/library/modules/MapCache.cpp @@ -79,10 +79,6 @@ using df::global::world; extern bool GetLocalFeature(t_feature &feature, df::coord2d rgn_pos, int32_t index); -#ifdef LINUX_BUILD -const unsigned MapExtras::BiomeInfo::MAX_LAYERS; -#endif - const BiomeInfo MapCache::biome_stub = { df::coord2d(), -1, -1, -1, -1,