Bläddra i källkod

Fixed a few warnings.

Frank Zago 15 år sedan
förälder
incheckning
c84c9cb481
5 ändrade filer med 11 tillägg och 7 borttagningar
  1. 1 1
      CConsoleHandler.cpp
  2. 2 2
      hch/CArtHandler.cpp
  3. 0 1
      hch/CBuildingHandler.cpp
  4. 6 1
      hch/CHeroHandler.cpp
  5. 2 2
      hch/CLodHandler.cpp

+ 1 - 1
CConsoleHandler.cpp

@@ -218,7 +218,7 @@ void CConsoleHandler::end()
 {
 	if (thread) {
 		ThreadHandle th = (ThreadHandle)thread->native_handle();
-		int ret = _kill_thread(th);
+		_kill_thread(th);
 		thread->join();
 		delete thread;
 		thread = NULL;

+ 2 - 2
hch/CArtHandler.cpp

@@ -80,7 +80,7 @@ bool CArtifact::fitsAt (const std::map<ui16, ui32> &artifWorn, ui16 slotID) cons
 
 			if (slot == 6 || slot == 7)
 				rings++;
-			else if (slot >= 9 && slot <= 12 || slot == 18)
+			else if ((slot >= 9 && slot <= 12) || slot == 18)
 				misc++;
 			else if (tempArtifWorn.find(slot) != tempArtifWorn.end())
 				return false;
@@ -816,4 +816,4 @@ void CArtHandler::initAllowedArtifactsList(const std::vector<ui8> &allowed)
 		if (allowed[i])
 			allowedArtifacts.push_back(artifacts[i]);
 	}
-}
+}

+ 0 - 1
hch/CBuildingHandler.cpp

@@ -48,7 +48,6 @@ static CBuilding * readBg(std::string &buf, int& it)
 void CBuildingHandler::loadBuildings()
 {
 	std::string buf = bitmaph->getTextFile("BUILDING.TXT"), temp;
-	unsigned int andame = buf.size();
 	int it=0; //buf iterator
 
 	temp = readTo(buf,it,'\n');temp = readTo(buf,it,'\n');//read 2 lines of file info

+ 6 - 1
hch/CHeroHandler.cpp

@@ -6,7 +6,13 @@
 #include <iomanip>
 #include <sstream>
 #include <fstream>
+#include <boost/version.hpp>
+#if BOOST_VERSION >= 103800
+#include <boost/spirit/include/classic.hpp>
+#else
 #include <boost/spirit.hpp>
+#endif
+
 using namespace boost::spirit;
 
 extern CLodHandler * bitmaph;
@@ -217,7 +223,6 @@ void CHeroHandler::loadPuzzleInfo()
 void CHeroHandler::loadHeroes()
 {
 	VLC->heroh = this;
-	int ID=0;
 	std::string buf = bitmaph->getTextFile("HOTRAITS.TXT");
 	int it=0;
 	std::string dump;

+ 2 - 2
hch/CLodHandler.cpp

@@ -108,7 +108,7 @@ unsigned char * CLodHandler::giveFile(std::string defName, int * length)
 		LOD.read((char*)outp, ourEntry->size);
 		mutex->unlock();
 		unsigned char * decomp = NULL;
-		int decRes = infs2(outp, ourEntry->size, ourEntry->realSize, decomp);
+		infs2(outp, ourEntry->size, ourEntry->realSize, decomp);
 		delete[] outp;
 		return decomp;
 	}
@@ -340,4 +340,4 @@ unsigned char * CLodHandler::getUnpackedFile( const std::string & path, int * si
 
 	*sizeOut = mapsize;
 	return initTable;
-}
+}