1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Fixed a few warnings.

This commit is contained in:
Frank Zago 2010-08-21 00:39:37 +00:00
parent 29045f5c0f
commit c84c9cb481
5 changed files with 11 additions and 7 deletions

View File

@ -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;

View File

@ -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]);
}
}
}

View File

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

View File

@ -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;

View File

@ -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;
}
}