浏览代码

code review

Michael 2 年之前
父节点
当前提交
51ba22a631
共有 4 个文件被更改,包括 3 次插入11 次删除
  1. 1 1
      client/CPlayerInterface.cpp
  2. 0 3
      client/CServerHandler.cpp
  3. 2 2
      lib/StartInfo.h
  4. 0 5
      server/CVCMIServer.cpp

+ 1 - 1
client/CPlayerInterface.cpp

@@ -193,7 +193,7 @@ void CPlayerInterface::playerStartsTurn(PlayerColor player)
 
 void CPlayerInterface::performAutosave()
 {
-	std::string id = cb->getStartInfo()->uuid.substr(0, 8);
+	std::string id = cb->getStartInfo()->gameUuid.substr(0, 8);
 
 	int frequency = static_cast<int>(settings["general"]["saveFrequency"].Integer());
 	if(frequency > 0 && cb->getDate() % frequency == 0)

+ 0 - 3
client/CServerHandler.cpp

@@ -49,9 +49,6 @@
 #include "../lib/serializer/Connection.h"
 #include "../lib/serializer/CMemorySerializer.h"
 
-#include <boost/uuid/uuid.hpp>
-#include <boost/uuid/uuid_io.hpp>
-#include <boost/uuid/uuid_generators.hpp>
 #include <boost/asio.hpp>
 #include "../lib/serializer/Cast.h"
 #include "LobbyClientNetPackVisitors.h"

+ 2 - 2
lib/StartInfo.h

@@ -80,7 +80,7 @@ struct DLL_LINKAGE StartInfo
 	ui32 seedToBeUsed; //0 if not sure (client requests server to decide, will be send in reply pack)
 	ui32 seedPostInit; //so we know that game is correctly synced at the start; 0 if not known yet
 	ui32 mapfileChecksum; //0 if not relevant
-	std::string uuid;
+	std::string gameUuid;
 	ui8 turnTime; //in minutes, 0=unlimited
 	std::string mapname; // empty for random map, otherwise name of the map or savegame
 	bool createRandomMap() const { return mapGenOptions != nullptr; }
@@ -104,7 +104,7 @@ struct DLL_LINKAGE StartInfo
 		h & seedToBeUsed;
 		h & seedPostInit;
 		h & mapfileChecksum;
-		h & uuid;
+		h & gameUuid;
 		h & turnTime;
 		h & mapname;
 		h & mapGenOptions;

+ 0 - 5
server/CVCMIServer.cpp

@@ -50,11 +50,6 @@
 // for applier
 #include "../lib/registerTypes/RegisterTypes.h"
 
-// UUID generation
-#include <boost/uuid/uuid.hpp>
-#include <boost/uuid/uuid_io.hpp>
-#include <boost/uuid/uuid_generators.hpp>
-
 #include "../lib/gameState/CGameState.h"
 
 template<typename T> class CApplyOnServer;