From f5ddc44827e68a120b68c7458026cb1c1f9139f9 Mon Sep 17 00:00:00 2001 From: DjWarmonger Date: Tue, 13 Nov 2012 12:55:47 +0000 Subject: [PATCH] - Compile fix - unique_ptr can't be serialized - Linking fix - now MapGenOptions have DLL-interface (but probably shouldn't be called directly from client anyway) --- client/CPreGame.cpp | 2 +- client/CPreGame.h | 2 ++ lib/CModHandler.h | 2 +- lib/RMG/CMapGenOptions.h | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/client/CPreGame.cpp b/client/CPreGame.cpp index 3a91204e5..0dbdca7e8 100644 --- a/client/CPreGame.cpp +++ b/client/CPreGame.cpp @@ -596,7 +596,7 @@ CSelectionScreen::CSelectionScreen(CMenuScreen::EState Type, CMenuScreen::EMulti opt = new OptionsTab(); //scenario options tab opt->recActions = DISPOSE; - randMapTab = new RandomMapTab; + randMapTab = new RandomMapTab(); randMapTab->recActions = DISPOSE; } sel = new SelectionTab(screenType, bind(&CSelectionScreen::changeSelection, this, _1), multiPlayer); //scenario selection tab diff --git a/client/CPreGame.h b/client/CPreGame.h index 157ad4ebd..8627b8b8f 100644 --- a/client/CPreGame.h +++ b/client/CPreGame.h @@ -28,6 +28,8 @@ class CTextBox; class CCampaignState; class CConnection; class JsonNode; +class CMapGenOptions; +class RandomMapTab; struct CPackForSelectionScreen; struct PlayerInfo; diff --git a/lib/CModHandler.h b/lib/CModHandler.h index 2d581daf3..57f62f9e2 100644 --- a/lib/CModHandler.h +++ b/lib/CModHandler.h @@ -31,7 +31,7 @@ public: std::vector requirements; /// mod configuration (mod.json). - std::unique_ptr config; + std::shared_ptr config; //TODO: unique_ptr can't be serialized template void serialize(Handler &h, const int version) { diff --git a/lib/RMG/CMapGenOptions.h b/lib/RMG/CMapGenOptions.h index 716794c43..133019429 100644 --- a/lib/RMG/CMapGenOptions.h +++ b/lib/RMG/CMapGenOptions.h @@ -48,7 +48,7 @@ namespace EMonsterStrength * The map gen options class holds values about general map * generation settings e.g. the size of the map, the count of players,... */ -class CMapGenOptions +class DLL_LINKAGE CMapGenOptions { public: /**