2
0
Эх сурвалжийг харах

- 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)

DjWarmonger 13 жил өмнө
parent
commit
f5ddc44827

+ 1 - 1
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

+ 2 - 0
client/CPreGame.h

@@ -28,6 +28,8 @@ class CTextBox;
 class CCampaignState;
 class CConnection;
 class JsonNode;
+class CMapGenOptions;
+class RandomMapTab;
 struct CPackForSelectionScreen;
 struct PlayerInfo;
 

+ 1 - 1
lib/CModHandler.h

@@ -31,7 +31,7 @@ public:
 	std::vector <TModID> requirements;
 
 	/// mod configuration (mod.json).
-	std::unique_ptr<JsonNode> config;
+	std::shared_ptr<JsonNode> config; //TODO: unique_ptr can't be serialized
 
 	template <typename Handler> void serialize(Handler &h, const int version)
 	{

+ 1 - 1
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:
 	/**