Browse Source

- fixed some compiler warnings, gcc\clang work fine
- better handling of innoextract in vcmibuilder.

Ivan Savenko 12 years ago
parent
commit
5a8787b74d
5 changed files with 6 additions and 7 deletions
  1. 1 1
      Global.h
  2. 1 1
      client/BattleInterface/CBattleInterface.h
  3. 1 1
      lib/NetPacks.h
  4. 1 1
      lib/RegisterTypes.h
  5. 2 3
      vcmibuilder

+ 1 - 1
Global.h

@@ -483,7 +483,7 @@ namespace vstd
 		});
 	}
 
-	static int retreiveRandNum(const boost::function<int()> &randGen)
+	static inline int retreiveRandNum(const boost::function<int()> &randGen)
 	{
 		if (randGen)
 			return randGen();

+ 1 - 1
client/BattleInterface/CBattleInterface.h

@@ -47,7 +47,7 @@ struct ProjectileInfo;
 class CClickableHex;
 struct BattleHex;
 struct InfoAboutHero;
-class BattleAction;
+struct BattleAction;
 
 /// Class which manages the locked hex fields that are blocked e.g. by obstacles
 class CBattleObstacle

+ 1 - 1
lib/NetPacks.h

@@ -1838,7 +1838,7 @@ struct DisbandCreature : public CPackForServer
 struct BuildStructure : public CPackForServer
 {
 	BuildStructure(){};
-	BuildStructure(si32 TID, BuildingID BID):bid(BID),tid(TID){};
+	BuildStructure(si32 TID, BuildingID BID):tid(TID), bid(BID){};
 	si32 tid; //town id
 	BuildingID bid; //structure id
 

+ 1 - 1
lib/RegisterTypes.h

@@ -253,7 +253,7 @@ void registerTypes4(Serializer &s)
 }
 
 template<typename Serializer>
-void registerTypes(Serializer &s)
+DLL_LINKAGE void registerTypes(Serializer &s)
 {
 	registerTypes1(s);
 	registerTypes2(s);

+ 2 - 3
vcmibuilder

@@ -168,9 +168,8 @@ if [[ -n "$gog_file" ]]
 then
 	# innoextract always reports error (iconv 84 error). Just test file for presence
 	test -f "$gog_file" || fail "Error: gog.com executable was not found!"
-	innoextract -s -p 1 "$gog_file"
-	
-	mv ./app "$temp_dir"
+	(gog_file=`readlink -f "$gog_file"` && cd "$temp_dir" && innoextract -s -p 1 "$gog_file")
+
 	data_dir="$temp_dir"/app
 fi