Changed: #853 Compilation on 64-bits platforms

This commit is contained in:
kervala 2010-05-13 23:37:09 +02:00
parent 56817a2f73
commit 176a07c911

View file

@ -155,23 +155,24 @@ bool putIn (NLMISC::CBitmap *pSrc, NLMISC::CBitmap *pDst, sint32 x, sint32 y)
string getBaseName (const string &fullname)
{
string sTmp2 = "";
int pos = fullname.rfind('_');
for (int j = 0; j <= pos; ++j)
sTmp2 += fullname[j];
string::size_type pos = fullname.rfind('_');
if (pos != string::npos)
sTmp2 = fullname.substr(0, pos+1);
return sTmp2;
}
// ---------------------------------------------------------------------------
uint8 getLayerNb (const string &fullname)
{
string sTmp2;
uint8 nRet = 0;
int beg = fullname.rfind('_');
int end = fullname.rfind('.');
for (int j = beg+1; j < end; ++j)
sTmp2 += fullname[j];
string::size_type beg = fullname.rfind('_');
string::size_type end = fullname.rfind('.');
if (beg != string::npos)
{
string sTmp2 = fullname.substr(beg+1, end-beg-1);
NLMISC::fromString(sTmp2, nRet);
}
NLMISC::fromString(sTmp2, nRet);
return nRet;
}
@ -478,7 +479,7 @@ int main(int nNbArg, char **ppArgs)
std::string start = AllLightmapNames[k].substr(0, tags[l].size());
if (NLMISC::nlstricmp(start, tags[l]) == 0)
{
bestLength = tags[l].size();
bestLength = (uint)tags[l].size();
// the tag matchs
AllLightmapTags[k] = l;
}