Merge branch 'develop' into ryzomclassic-develop

ryzomclassic-develop
kaetemi 4 years ago
commit ae1f4d2df3

@ -212,8 +212,8 @@ int main(int argc, char *argv[])
for(j=0;j<LodFilters.size();j++)
{
// Make the test case-unsensitive
string lwrFileName= toLower(fileNameIn);
string lwrFilter= toLower(LodFilters[j]);
string lwrFileName= toLowerAscii(fileNameIn);
string lwrFilter= toLowerAscii(LodFilters[j]);
if( testWildCard(lwrFileName.c_str(), lwrFilter.c_str()) )
{
string clodFile= clod_dir_in+"/"+LodNames[j]+".clod";

@ -180,7 +180,7 @@ bool writeFileDependingOnFilename(const std::string &filename, CBitmap &bitmap)
if (out.open(filename))
{
if (toLower(filename).find(".png") != string::npos)
if (toLowerAscii(filename).find(".png") != string::npos)
{
bitmap.writePNG(out, 32);
}
@ -583,7 +583,7 @@ int main(int argc, char **argv)
continue;
}
sTGAname = toLower(string(tgaName));
sTGAname = toLowerAscii(string(tgaName));
// search position of extension
std::string tgaExt = CFile::getExtension(sTGAname);
@ -597,7 +597,7 @@ int main(int argc, char **argv)
for (i = 0; i < mapSize; ++i)
{
// get the string whitout path
findTGAName = toLower(CFile::getFilenameWithoutExtension(AllMapNames[i]));
findTGAName = toLowerAscii(CFile::getFilenameWithoutExtension(AllMapNames[i]));
if( findTGAName == sTGAname )
break;
}

@ -353,7 +353,7 @@ int main(int nNbArg, char**ppArgs)
vector<string> vAllFiles;
for(uint i = 0, len = (uint)vAllFilesUnfiltered.size(); i < len; ++i)
{
if (toLower(CFile::getExtension(vAllFilesUnfiltered[i])) == "ig")
if (toLowerAscii(CFile::getExtension(vAllFilesUnfiltered[i])) == "ig")
{
vAllFiles.push_back(vAllFilesUnfiltered[i]);
}

@ -170,7 +170,7 @@ void CIgLighterLib::lightIg(CInstanceLighter &instanceLighter,
string name= igIn.getShapeName(i);
bool shapeFound= true;
if (toLower (CFile::getExtension (name)) == "pacs_prim")
if (toLowerAscii (CFile::getExtension (name)) == "pacs_prim")
{
nlwarning("EXPORT BUG: Can't read %s (not a shape), should not be part of .ig!", name.c_str());
continue;

@ -481,7 +481,7 @@ int main(int nNbArg, char **ppArgs)
CTextureFile *pTF = dynamic_cast<CTextureFile*>(pIT);
if (pTF != NULL)
{
string sTexName = NLMISC::toLower(pTF->getFileName());
string sTexName = NLMISC::toLowerAscii(pTF->getFileName());
if(pTF->getUploadFormat()==ITexture::Luminance)
setLM8Bit.insert(sTexName);
}
@ -530,7 +530,7 @@ int main(int nNbArg, char **ppArgs)
tmpLMs.clear();
for (i = 0; i < (sint32)AllLightmapNames.size(); ++i)
{
bool lm8Bit= setLM8Bit.find( NLMISC::toLower(AllLightmapNames[i]) ) !=setLM8Bit.end();
bool lm8Bit= setLM8Bit.find( NLMISC::toLowerAscii(AllLightmapNames[i]) ) !=setLM8Bit.end();
// if same mode
if( lm8Bit == (lmc8bitMode==1) )
{
@ -824,13 +824,13 @@ int main(int nNbArg, char **ppArgs)
CTextureFile *pTF = dynamic_cast<CTextureFile*>(pIT);
if (pTF != NULL)
{
string sTexName = NLMISC::toLower(getBaseName(pTF->getFileName()));
string sTexNameMoved = NLMISC::toLower(getBaseName(AllLightmapNames[i]));
string sTexName = NLMISC::toLowerAscii(getBaseName(pTF->getFileName()));
string sTexNameMoved = NLMISC::toLowerAscii(getBaseName(AllLightmapNames[i]));
if (sTexName == sTexNameMoved)
{
// We must remap the name and indicate to remap uvs
bMustRemapUV = true;
//string sNewTexName = NLMISC::toLower(getBaseName(AllLightmapNames[j]));
//string sNewTexName = NLMISC::toLowerAscii(getBaseName(AllLightmapNames[j]));
//sNewTexName += NLMISC::toString(getLayerNb(pTF->getFileName())) + ".tga";
//pTF->setFileName (sNewTexName);
}
@ -891,11 +891,11 @@ int main(int nNbArg, char **ppArgs)
CTextureFile *pTF = dynamic_cast<CTextureFile*>(pIT);
if (pTF != NULL)
{
string sTexName = NLMISC::toLower(getBaseName(pTF->getFileName()));
string sTexNameMoved = NLMISC::toLower(getBaseName(AllLightmapNames[i]));
string sTexName = NLMISC::toLowerAscii(getBaseName(pTF->getFileName()));
string sTexNameMoved = NLMISC::toLowerAscii(getBaseName(AllLightmapNames[i]));
if (sTexName == sTexNameMoved)
{
string sNewTexName = NLMISC::toLower(getBaseName(AllLightmapNames[j]));
string sNewTexName = NLMISC::toLowerAscii(getBaseName(AllLightmapNames[j]));
sNewTexName += NLMISC::toString(getLayerNb(pTF->getFileName())) + ".tga";
pTF->setFileName (sNewTexName);
}

@ -3696,7 +3696,7 @@ void CObjectViewer::shootScene()
string extension = NLMISC::CFile::getExtension (tStrToUtf8(fileDlg.GetPathName()));
// The file name without extension
bool jpeg = toLower (extension) == "jpg";
bool jpeg = toLowerAscii (extension) == "jpg";
// Activate the driver
CNELU::Driver->activate ();

@ -458,7 +458,7 @@ void CSnapshotToolDlg::OnGo()
CString wildCard;
m_Filters.GetText(l, wildCard);
wildCard.MakeLower();
if (testWildCard(toLower(NLMISC::CFile::getFilename(files[k])).c_str(), tStrToUtf8(wildCard).c_str()))
if (testWildCard(toLowerAscii(NLMISC::CFile::getFilename(files[k])).c_str(), tStrToUtf8(wildCard).c_str()))
{
_FilteredFiles.push_back(files[k]);
break;

@ -325,7 +325,7 @@ int main(int argc, char* argv[])
NLMISC::CConfigFile::CVar &bitmap_extensions = cf.getVar ("bitmap_extensions");
for (uint k = 0; k < (uint) bitmap_extensions.size(); ++k)
{
std::string ext = "." + NLMISC::toLower(bitmap_extensions.asString(k));
std::string ext = "." + NLMISC::toLowerAscii(bitmap_extensions.asString(k));
if (std::find(bi.BitmapExtensions.begin(), bi.BitmapExtensions.end(), ext) == bi.BitmapExtensions.end())
{
bi.BitmapExtensions.push_back(ext);
@ -483,7 +483,7 @@ static void BuildColoredVersions(const CBuildInfo &bi)
{
for (uint l = 0; l < bi.BitmapExtensions.size(); ++l)
{
std::string fileExt = "." + NLMISC::toLower(NLMISC::CFile::getExtension(files[k]));
std::string fileExt = "." + NLMISC::toLowerAscii(NLMISC::CFile::getExtension(files[k]));
if (fileExt == bi.BitmapExtensions[l])
{
//nlwarning("Processing : %s ", files[k].c_str());
@ -532,7 +532,7 @@ static bool CheckIfNeedRebuildColoredVersionForOneBitmap(const CBuildInfo &bi, c
masks.clear();
std::string fileName = NLMISC::CFile::getFilenameWithoutExtension(fileNameWithExtension);
std::string fileExt = NLMISC::toLower(NLMISC::CFile::getExtension(fileNameWithExtension));
std::string fileExt = NLMISC::toLowerAscii(NLMISC::CFile::getExtension(fileNameWithExtension));
for (uint k = 0; k < bi.ColorMasks.size(); ++k)
{
@ -721,7 +721,7 @@ static void BuildColoredVersionForOneBitmap(const CBuildInfo &bi, const std::str
masks.clear();
std::string fileName = NLMISC::CFile::getFilenameWithoutExtension(fileNameWithExtension);
std::string fileExt = NLMISC::toLower(NLMISC::CFile::getExtension(fileNameWithExtension));
std::string fileExt = NLMISC::toLowerAscii(NLMISC::CFile::getExtension(fileNameWithExtension));
uint k;
for (k = 0; k < bi.ColorMasks.size(); ++k)

@ -169,7 +169,7 @@ sint main(int argc, char **argv)
if (filenames[i].find(".max") == std::string::npos)
continue;
std::string baseFilename = toLower(CFile::getFilenameWithoutExtension(filenames[i]));
std::string baseFilename = toLowerAscii(CFile::getFilenameWithoutExtension(filenames[i]));
// compute the md5 of .max file
std::string md5 = getNewMD5(filenames[i]).toString();

@ -104,7 +104,7 @@ bool parseOptions(int argc, char **argv)
// Filename
else
{
std::string ext = NLMISC::toLower(NLMISC::CFile::getExtension(option));
std::string ext = NLMISC::toLowerAscii(NLMISC::CFile::getExtension(option));
if (ext == "png" || ext == "tga")
{
@ -135,7 +135,7 @@ int main(int argc, char **argv)
for(uint i = 0; i < InputFilenames.size(); ++i)
{
std::string ext = NLMISC::toLower(NLMISC::CFile::getExtension(InputFilenames[i]));
std::string ext = NLMISC::toLowerAscii(NLMISC::CFile::getExtension(InputFilenames[i]));
NLMISC::CIFile input;

@ -327,10 +327,10 @@ int main(int argc, char **argv)
if (args.haveArg("a"))
{
std::string strAlgo = args.getArg("a").front();
std::string strAlgo = toLowerAscii(args.getArg("a").front());
if (strAlgo == "1") OptAlgo = DXT1;
else if (toLower(strAlgo) == "1a") OptAlgo = DXT1A;
else if (strAlgo == "1a") OptAlgo = DXT1A;
else if (strAlgo == "3") OptAlgo = DXT3;
else if (strAlgo == "5") OptAlgo = DXT5;
else if (strAlgo == "tga8") OptAlgo = TGA8;

@ -525,7 +525,7 @@ int main (int argc, char* argv[])
// Write the dependencies file
FILE *outputFile;
if ((outputFile = nlfopen (toLower (outputFileName), "w")))
if ((outputFile = nlfopen (toLowerAscii (outputFileName), "w")))
{
// Add a dependency entry
fprintf (outputFile, "dependencies =\n{\n");
@ -540,7 +540,7 @@ int main (int argc, char* argv[])
// Write it
string message="\t\""+zoneName+"\"";
fprintf (outputFile, "%s", toLower (message).c_str());
fprintf (outputFile, "%s", toLowerAscii (message).c_str());
// Next ite;
ite++;
@ -615,7 +615,7 @@ static void computeIGBBox(const NL3D::CInstanceGroup &ig, CLightingBBox &result,
{
nlwarning("Unable to find shape '%s'", it->Name.c_str());
}
else if (toLower (CFile::getExtension (shapePathName)) == "pacs_prim")
else if (toLowerAscii (CFile::getExtension (shapePathName)) == "pacs_prim")
{
nlwarning("EXPORT BUG: Can't read %s (not a shape), should not be part of .ig!", shapePathName.c_str());
}
@ -711,7 +711,7 @@ static void computeIGBBox(const NL3D::CInstanceGroup &ig, CLightingBBox &result,
static void computeZoneIGBBox(const char *zoneName, CLightingBBox &result, TShapeMap &shapeMap, const TString2LightingBBox &additionnalIG)
{
result = CLightingBBox(); // starts with a void box
std::string lcZoneName = NLMISC::toLower(std::string(zoneName));
std::string lcZoneName = NLMISC::toLowerAscii(std::string(zoneName));
TString2LightingBBox::const_iterator zoneIt = additionnalIG.find(lcZoneName);
if (zoneIt != additionnalIG.end())
{
@ -901,7 +901,7 @@ static void computeIGBBoxFromContinent(NLMISC::CConfigFile &parameter,
nlwarning("Couldn't get zone name of village %d in continent %s", continentName.c_str(), k);
continue;
}
zoneName = NLMISC::toLower(CFile::getFilenameWithoutExtension(zoneName));
zoneName = NLMISC::toLowerAscii(CFile::getFilenameWithoutExtension(zoneName));
CLightingBBox result;
// ok, it is in the dependant zones
computeBBoxFromVillage(currVillage, continentName, k, shapeMap, result);

@ -105,7 +105,7 @@ bool getXYFromZoneName(sint32 &x, sint32 &y, const string &zoneName)
}
if (xStr.size() != 2)
goto Fail;
xStr = NLMISC::toUpper(xStr);
xStr = NLMISC::toUpperAscii(xStr);
x = ((xStr[0] - 'A') * 26 + (xStr[1] - 'A'));
return true;
Fail:

@ -116,7 +116,7 @@ int main(int argc, char* argv[])
if (inputFile.open (argv[1]))
{
// Zone name
string zoneName=toLower (string ("zone_"+getName (argv[1])));
string zoneName=toLowerAscii (string ("zone_"+getName (argv[1])));
// Load the zone
try
@ -413,7 +413,7 @@ int main(int argc, char* argv[])
if(group->getInstance(instance).DontCastShadow || group->getInstance(instance).DontCastShadowForExterior)
continue;
if (toLower (CFile::getExtension (name)) == "pacs_prim")
if (toLowerAscii (CFile::getExtension (name)) == "pacs_prim")
{
nlwarning("EXPORT BUG: Can't read %s (not a shape), should not be part of .ig!", name.c_str());
continue;

@ -140,7 +140,7 @@ static void loadIGFromVillage(const NLGEORGES::UFormElm *villageItem, const std:
// verify that the ig is not already added (case of tr_water.ig in additional_igs)
for(uint igAdd= 0;igAdd<(uint)additionalIgNames.size();igAdd++)
{
if( toLower(additionalIgNames.asString()) == toLower(igName) )
if( toLowerAscii(additionalIgNames.asString()) == toLower(igName) )
{
nlwarning("Skipping Village Ig %s, cause already exist in additional ig", igName.c_str());
continue;
@ -315,7 +315,7 @@ int main(int argc, char* argv[])
if (inputFile.open (argv[1]))
{
// Zone name
string zoneName=toLower (string ("zone_"+getName (argv[1])));
string zoneName=toLowerAscii (string ("zone_"+getName (argv[1])));
// Load the zone
try
@ -702,14 +702,14 @@ int main(int argc, char* argv[])
if(group->getInstance(instance).DontCastShadow || group->getInstance(instance).DontCastShadowForExterior)
continue;
if (toLower (CFile::getExtension (name)) == "pacs_prim")
if (toLowerAscii (CFile::getExtension (name)) == "pacs_prim")
{
nlwarning("EXPORT BUG: Can't read %s (not a shape), should not be part of .ig!", name.c_str());
continue;
}
// PS ?
if (toLower (CFile::getExtension (name)) == "ps")
if (toLowerAscii (CFile::getExtension (name)) == "ps")
continue;
// Add a .shape at the end ?

@ -738,7 +738,7 @@ void convertCsvFile( const string &file, bool generate, const string& sheetType
}
else if ( nlstricmp( fields[i], "parent" ) == 0 )
{
fields[i] = toLower( fields[i] );
fields[i] = toLowerAscii( fields[i] );
}
else
{
@ -883,7 +883,7 @@ void convertCsvFile( const string &file, bool generate, const string& sheetType
{
filebase += "." + sheetType;
}
filebase = toLower(filebase);
filebase = toLowerAscii(filebase);
string filename, dirbase;
bool isNewSheet=true;
@ -905,7 +905,7 @@ void convertCsvFile( const string &file, bool generate, const string& sheetType
else
{
// Load template sheet
filename = toLower(filebase);
filename = toLowerAscii(filebase);
form = (CForm*)formLoader->loadForm( (string("_empty.") + sheetType).c_str() );
if (form == NULL)
{

@ -104,7 +104,7 @@ bool getXYFromZoneName(sint32 &x, sint32 &y, const string &zoneName)
}
if (xStr.size() != 2)
goto Fail;
xStr = NLMISC::toUpper(xStr);
xStr = NLMISC::toUpperAscii(xStr);
x = ((xStr[0] - 'A') * 26 + (xStr[1] - 'A'));
return true;
Fail:

@ -56,7 +56,7 @@ bool keepFile (const std::string &fileName)
uint i;
bool ifPresent = false;
bool ifTrue = false;
string file = toLower(CFile::getFilename (fileName));
string file = toLowerAscii(CFile::getFilename (fileName));
for (i=0; i<WildCards.size(); i++)
{
if (WildCards[i].Not)
@ -100,7 +100,7 @@ bool packSubRecurse(const std::string &srcDirectory)
// check for files with same name
for(uint i = 1, len = pathContent.size(); i < len; ++i)
{
if (toLower(CFile::getFilename(pathContent[i-1])) == toLower(CFile::getFilename(pathContent[i])))
if (toLowerAscii(CFile::getFilename(pathContent[i-1])) == toLowerAscii(CFile::getFilename(pathContent[i])))
{
nlwarning("File %s is not unique in BNP!", CFile::getFilename(pathContent[i]).c_str());
return false;
@ -152,7 +152,7 @@ int main(int argc, char **argv)
for (uint i = 0; i < filters.size(); ++i)
{
CWildCard card;
card.Expression = toLower(filters[i]);
card.Expression = toLowerAscii(filters[i]);
card.Not = false;
WildCards.push_back(card);
}
@ -163,7 +163,7 @@ int main(int argc, char **argv)
for (uint i = 0; i < filters.size(); ++i)
{
CWildCard card;
card.Expression = toLower(filters[i]);
card.Expression = toLowerAscii(filters[i]);
card.Not = true;
WildCards.push_back(card);
}

@ -108,21 +108,21 @@ BOOL CData_mirrorApp::InitInstance()
cf.load (path);
MainDirectory = cf.getVar ("MainDirectory").asString ();
MainDirectory = toLower (CPath::standardizePath (MainDirectory));
MainDirectory = toLowerAscii (CPath::standardizePath (MainDirectory));
MirrorDirectory = cf.getVar ("MirrorDirectory").asString ();
MirrorDirectory = toLower (CPath::standardizePath (MirrorDirectory));
MirrorDirectory = toLowerAscii (CPath::standardizePath (MirrorDirectory));
LogDirectory = cf.getVar ("LogDirectory").asString ();
LogDirectory = toLower (CPath::standardizePath (LogDirectory));
LogDirectory = toLowerAscii (CPath::standardizePath (LogDirectory));
IgnoreDirectory = cf.getVar ("IgnoreDirectory").asString ();
IgnoreDirectory = toLower (CPath::standardizePath (IgnoreDirectory));
IgnoreDirectory = toLowerAscii (CPath::standardizePath (IgnoreDirectory));
if (IgnoreDirectory.empty())
IgnoreDirectory = MainDirectory;
string sBinaryCompare = cf.getVar ("BinaryCompare").asString ();
sBinaryCompare = toLower (sBinaryCompare);
sBinaryCompare = toLowerAscii (sBinaryCompare);
BinaryCompare = false;
if ((sBinaryCompare == "true") || (sBinaryCompare=="1"))
BinaryCompare = true;
@ -145,12 +145,12 @@ BOOL CData_mirrorApp::InitInstance()
if (NLMISC::CFile::isDirectory (CurrentDir))
{
directory = true;
CurrentDir = toLower(CPath::standardizePath (CurrentDir));
CurrentDir = toLowerAscii(CPath::standardizePath (CurrentDir));
}
else if (NLMISC::CFile::fileExists (CurrentDir))
{
directory = false;
CurrentDir = toLower(CPath::standardizePath (NLMISC::CFile::getPath (CurrentDir)));
CurrentDir = toLowerAscii(CPath::standardizePath (NLMISC::CFile::getPath (CurrentDir)));
}
else
{

@ -628,7 +628,7 @@ void CData_mirrorDlg::buildSourceFiles ()
{
// Get the filename
string &str = fileSource[i];
str = toLower(str.substr (MainDirectory.size (), str.size ()));
str = toLowerAscii(str.substr (MainDirectory.size (), str.size ()));
// In the ignore list ?
if (IgnoreFiles.find (str) == IgnoreFiles.end () && (str != "ignore_list.txt"))
@ -716,7 +716,7 @@ void CData_mirrorDlg::buildSourceFiles ()
{
// Get the filename
string &str = fileSource[i];
str = toLower(str.substr (MirrorDirectory.size (), str.size ()));
str = toLowerAscii(str.substr (MirrorDirectory.size (), str.size ()));
// In the ignore list ?
if (IgnoreFiles.find (str) == IgnoreFiles.end () && (str != "ignore_list.txt"))

@ -214,7 +214,7 @@ void extractStringsFromBinary (const vector<char> &fileArray, set<string> &filen
if (str != "")
{
// Lower case
str = toLower (str);
str = toLowerAscii (str);
// Filter extensions
if (filterExtension (str.c_str(), extensions))
@ -280,7 +280,7 @@ void extractStringsFromASCII (const vector<char> &fileArray, set<string> &filena
temp[c] = begin[c];
// Lower case
temp = toLower (temp);
temp = toLowerAscii (temp);
// Filter extensions
if (filterExtension (temp.c_str(), extensions))
@ -325,7 +325,7 @@ bool loadConfigFiles (const char *ext, const char *input_files, const char *avai
while (fgets (name, 512, file))
{
// To string and lower
temp = toLower (string(name));
temp = toLowerAscii (string(name));
// Remove return
removeChar (temp, '\n');
@ -374,8 +374,8 @@ bool loadConfigFiles (const char *ext, const char *input_files, const char *avai
while (fgets (name, 512, file))
{
// To lower
temp = toLower (string(name));
temp2 = toLower (string(name));
temp = toLowerAscii (string(name));
temp2 = toLowerAscii (string(name));
// Remove space
removeBeginEndSpaces (temp);
@ -597,7 +597,7 @@ int main(int argc, char* argv[])
// It is used ?
if (usedFiles.find (available->first) == usedFiles.end())
{
string temp = toLower (available->second);
string temp = toLowerAscii (available->second);
fprintf (stderr, "UNUSED: %s\n", temp.c_str());
}

@ -320,10 +320,10 @@ void addId( string fileName )
if( itFI == FormToId.end() )
{
// double check : if file not found we check with lower case version of filename
map<string,TFormId>::iterator itFILwr = FormToId.find( toLower(fileName) );
map<string,TFormId>::iterator itFILwr = FormToId.find( toLowerAscii(fileName) );
if( itFILwr != FormToId.end() )
{
nlwarning("Trying to add %s but the file %s is already known ! becareful with lower case and upper case.", fileName.c_str(), toLower(fileName).c_str());
nlwarning("Trying to add %s but the file %s is already known ! becareful with lower case and upper case.", fileName.c_str(), toLowerAscii(fileName).c_str());
NbFilesDiscarded++;
return;
}

@ -64,7 +64,7 @@ bool keepFile (const char *fileName)
uint i;
bool ifPresent = false;
bool ifTrue = false;
string file = toLower(CFile::getFilename (fileName));
string file = toLowerAscii(CFile::getFilename (fileName));
for (i=0; i<WildCards.size(); i++)
{
if (WildCards[i].Not)

@ -184,7 +184,7 @@ bool CGeorgesEditDocForm::initDocument (const char *dfnName, bool newElement)
}
// Set file name and title
std::string name2 = toLower(NLMISC::CFile::getFilenameWithoutExtension(dfnName));
std::string name2 = toLowerAscii(NLMISC::CFile::getFilenameWithoutExtension(dfnName));
SetPathName(nlUtf8ToTStr("*." + name2), FALSE);
SetTitle(nlUtf8ToTStr("New " + name2 + " form"));
@ -547,7 +547,7 @@ BOOL CGeorgesEditDoc::OnOpenDocument(LPCTSTR lpszPathName)
{
// Check form
std::string ext = NLMISC::CFile::getExtension(tStrToUtf8(lpszPathName));
string extLower = toLower(ext);
string extLower = toLowerAscii(ext);
if (!extLower.empty ())
{

@ -107,7 +107,7 @@ void CImageListEx::addResourceIcon (const char *filename)
// Add in the map
std::string name = NLMISC::CFile::getFilenameWithoutExtension(filename);
_IconMapString.insert (std::map<string, int>::value_type (toLower(name), index));
_IconMapString.insert (std::map<string, int>::value_type (toLowerAscii(name), index));
// Release the icon
DestroyIcon (handle);
@ -132,7 +132,7 @@ int CImageListEx::getImage (int resource) const
int CImageListEx::getImage (const char *filename) const
{
std::string name = toLower(NLMISC::CFile::getFilenameWithoutExtension(filename));
std::string name = toLowerAscii(NLMISC::CFile::getFilenameWithoutExtension(filename));
std::map<string, int>::const_iterator ite = _IconMapString.find (name);
if (ite == _IconMapString.end())
return -1;

@ -239,8 +239,8 @@ BOOL CMissionCompilerFeDlg::OnInitDialog()
{
// We found the same filename : check the path
string srcPath = it->second;
srcPath = toUpper(CPath::standardizeDosPath(srcPath));
files[i] = toUpper(CPath::standardizeDosPath(files[i]));
srcPath = toUpperAscii(CPath::standardizeDosPath(srcPath));
files[i] = toUpperAscii(CPath::standardizeDosPath(files[i]));
if (srcPath != files[i])
{
::MessageBox(NULL, _T("Primitive path and working directory are not the same !"),

@ -189,7 +189,7 @@ GenderExtractor::GenderExtractor(const std::string & literal, const std::string&
const char * f = fs[level];
const char * h = hs[level];
_Identifier = toLower(identifier);
_Identifier = toLowerAscii(identifier);
std::string newPhrase;
@ -657,7 +657,7 @@ bool CMissionCompiler::installCompiledMission(NLLIGO::CLigoConfig &ligoConfig, c
// use mission primitive instead
fileName = primFileName;
}
if (loadedPrimitives.find(toLower(fileName)) == loadedPrimitives.end())
if (loadedPrimitives.find(toLowerAscii(fileName)) == loadedPrimitives.end())
{
string fullFileName = CPath::lookup(fileName, false);
if (fullFileName.empty())
@ -670,7 +670,7 @@ bool CMissionCompiler::installCompiledMission(NLLIGO::CLigoConfig &ligoConfig, c
if (loadXmlPrimitiveFile(*primDoc, fullFileName, ligoConfig))
{
// the primitive file is loaded correctly
loadedPrimitives.insert(make_pair(toLower(fileName), TLoadedPrimitive(primDoc, fullFileName)));
loadedPrimitives.insert(make_pair(toLowerAscii(fileName), TLoadedPrimitive(primDoc, fullFileName)));
CPrimitiveContext::instance().CurrentPrimitive = NULL;
}
else
@ -679,7 +679,7 @@ bool CMissionCompiler::installCompiledMission(NLLIGO::CLigoConfig &ligoConfig, c
throw EParseException(NULL, toString("Can't read primitive file '%s'", fullFileName.c_str()).c_str());
}
}
TLoadedPrimitive &loadedPrim = loadedPrimitives[toLower(fileName)];
TLoadedPrimitive &loadedPrim = loadedPrimitives[toLowerAscii(fileName)];
CPrimitives *primDoc = loadedPrim.PrimDoc;
TPrimitiveSet scripts;
@ -744,7 +744,7 @@ bool CMissionCompiler::installCompiledMission(NLLIGO::CLigoConfig &ligoConfig, c
fileName = primFileName;
}
TLoadedPrimitive &loadedPrim = loadedPrimitives[toLower(fileName)];
TLoadedPrimitive &loadedPrim = loadedPrimitives[toLowerAscii(fileName)];
CPrimitives *primDoc = loadedPrim.PrimDoc;
CPrimitiveContext::instance().CurrentPrimitive = primDoc;
@ -1304,7 +1304,7 @@ retry:
_Suffixe = tokens.back();
// generate identifier
_PhraseId = toUpper(md.getMissionName()+"_"+_Suffixe);
_PhraseId = toUpperAscii(md.getMissionName()+"_"+_Suffixe);
set<string> ps;
// select only unique params
@ -1857,11 +1857,11 @@ void CMissionData::parseMissionHeader(NLLIGO::IPrimitive *prim)
// _MissionTitle.init(*this, prim, vs);
_MissionDescriptionRaw = getPropertyArray(prim, "mission_description", false, false);
// _MissionDescription.init(*this, prim, vs);
_MonoInstance = toLower(getProperty(prim, "mono_instance", true, false)) == "true";
_RunOnce = toLower(getProperty(prim, "run_only_once", true, false)) == "true";
_Replayable = toLower(getProperty(prim, "replayable", true, false)) == "true";
_MonoInstance = toBool(getProperty(prim, "mono_instance", true, false));
_RunOnce = toBool(getProperty(prim, "run_only_once", true, false));
_Replayable = toBool(getProperty(prim, "replayable", true, false));
_NeedValidation = toLower(getProperty(prim, "need_validation", true, false)) == "true";
_NeedValidation = toBool(getProperty(prim, "need_validation", true, false));
_MissionAutoMenuRaw = getPropertyArray(prim, "phrase_auto_menu", false, false);
@ -1872,15 +1872,15 @@ void CMissionData::parseMissionHeader(NLLIGO::IPrimitive *prim)
else if (s == "guild")
_Guild = true;
_NotInJournal = NLMISC::toLower(getProperty(prim, "not_in_journal", false, false)) == "true";
_AutoRemoveFromJournal = NLMISC::toLower(getProperty(prim, "auto_remove_from_journal", false, false)) == "true";
_NotInJournal = NLMISC::toBool(getProperty(prim, "not_in_journal", false, false));
_AutoRemoveFromJournal = NLMISC::toBool(getProperty(prim, "auto_remove_from_journal", false, false));
_MissionCategory = getProperty(prim, "mission_category", false, false);
NLMISC::fromString(getProperty(prim, "player_replay_timer", true, false), _PlayerReplayTimer);
NLMISC::fromString(getProperty(prim, "global_replay_timer", true, false), _GlobalReplayTimer);
_NotProposed = NLMISC::toLower(getProperty(prim, "not_proposed", false, false)) == "true";
_MissionAuto = NLMISC::toLower(getProperty(prim, "automatic", false, false)) == "true";
_NonAbandonnable = NLMISC::toLower(getProperty(prim, "non_abandonnable", false, false)) == "true";
_FailIfInventoryIsFull = NLMISC::toLower(getProperty(prim, "fail_if_inventory_is_full", false, false)) == "true";
_NotProposed = NLMISC::toBool(getProperty(prim, "not_proposed", false, false));
_MissionAuto = NLMISC::toBool(getProperty(prim, "automatic", false, false));
_NonAbandonnable = NLMISC::toBool(getProperty(prim, "non_abandonnable", false, false));
_FailIfInventoryIsFull = NLMISC::toBool(getProperty(prim, "fail_if_inventory_is_full", false, false));
_MissionIcon = getProperty(prim, "mission_icon", false, false);
if (_MissionAuto)

@ -471,7 +471,7 @@ public:
string s;
s = md.getProperty(prim, "hide_others", true, false);
_HideOthers = (NLMISC::toLower(s) == "true");
_HideOthers = NLMISC::toBool(s);
}
string genCode(CMissionData &md)
@ -788,7 +788,7 @@ public:
string s;
s = md.getProperty(prim, "group", true, false);
_Group = (NLMISC::toLower(s) == "true");
_Group = NLMISC::toBool(s);
_Guild = md.getProperty(prim, "guild", false, true) == "true";
// Check: if _Guild is true then check if we are in a guild mission
@ -866,7 +866,7 @@ public:
string s;
s = md.getProperty(prim, "group", true, false);
_Group = (NLMISC::toLower(s) == "true");
_Group = NLMISC::toBool(s);
_Guild = md.getProperty(prim, "guild", false, true) == "true";
// Check: if _Guild is true then check if we are in a guild mission
@ -1054,7 +1054,7 @@ public:
string s;
s = md.getProperty(prim, "group", true, false);
_Group = (NLMISC::toLower(s) == "true");
_Group = NLMISC::toBool(s);
IStepContent::init(md, prim);
}
@ -1111,7 +1111,7 @@ public:
string s;
s = md.getProperty(prim, "group", true, false);
_Group = (NLMISC::toLower(s) == "true");
_Group = NLMISC::toBool(s);
IStepContent::init(md, prim);
}
@ -1169,7 +1169,7 @@ public:
string s;
s = md.getProperty(prim, "group", true, false);
_Group = (NLMISC::toLower(s) == "true");
_Group = NLMISC::toBool(s);
IStepContent::init(md, prim);
}
@ -1320,7 +1320,7 @@ public:
_WorldPosition = md.getProperty(prim, "world_position", true, false);
string s;
prim->getPropertyByName("once", s);
_Once = (NLMISC::toLower(s) == "true");
_Once = NLMISC::toBool(s);
}
string genCode(CMissionData &md)
@ -3212,7 +3212,7 @@ public:
{
_GroupName = md.getProperty(prim, "group_to_escort", true, false);
string s = md.getProperty(prim, "save_all", true, false);
_SaveAll = (NLMISC::toLower(s) == "true");
_SaveAll = NLMISC::toBool(s);
CContentObjective::init(md, prim);
}

@ -527,7 +527,7 @@ public:
formDate = 0;
// In the map ?
string formShortName = NLMISC::toLower(CFile::getFilename (formName));
string formShortName = NLMISC::toLowerAscii(CFile::getFilename (formName));
map<string, CValue >::iterator ite = _FormMap.find (formShortName);
if (ite == _FormMap.end ())
{
@ -614,7 +614,7 @@ void addPointPrimitive (CLandscape &landscape, const char *primFilename, uint32
if (point->getPropertyByName ("form", plantFilename))
{
// Add an extension
if (NLMISC::toLower(CFile::getExtension (plantFilename)) != "plant")
if (NLMISC::toLowerAscii(CFile::getExtension (plantFilename)) != "plant")
plantFilename += ".plant";
// Load this form
@ -669,7 +669,7 @@ void addPointPrimitive (CLandscape &landscape, const char *primFilename, uint32
instance.Scale = CVector (scale, scale, scale);
instance.nParent = -1;
instance.Name = shape;
instance.InstanceName = NLMISC::toLower(CFile::getFilename (plantFilename));
instance.InstanceName = NLMISC::toLowerAscii(CFile::getFilename (plantFilename));
// Get the instance group ref
CIgContainer::CIG &instances = igs.get (x, y);
@ -826,7 +826,7 @@ int main (int argc, char**argv)
callback.progress ((float)i/(float)files.size ());
// Zonew ?
if (NLMISC::toLower(CFile::getExtension (files[i])) == "zonew")
if (NLMISC::toLowerAscii(CFile::getExtension (files[i])) == "zonew")
{
// Load it
try
@ -890,7 +890,7 @@ int main (int argc, char**argv)
for (i=0; i<fileCount; i++)
{
// Primitive file ?
if (NLMISC::toLower(CFile::getExtension (files[i])) == "primitive")
if (NLMISC::toLowerAscii(CFile::getExtension (files[i])) == "primitive")
{
// Progress bar
nlinfo (files[i].c_str());

@ -3485,7 +3485,7 @@ BOOL CMyComboBox::PreTranslateMessage( MSG* pMsg )
_LastString.clear();
// Add this char
_LastString.push_back (tolower((TCHAR) pMsg->wParam));
_LastString.push_back((wchar_t)NLMISC::toLower((ucchar)pMsg->wParam));
search = true;
// New stroke time
@ -3518,7 +3518,7 @@ BOOL CMyComboBox::PreTranslateMessage( MSG* pMsg )
{
// 0 final
text[511] = 0;
_LastString = tStrToUtf8(text);
_LastString = CUtfStringView(tStrToUtf8(text)).toWide();
search = true;
}
}
@ -3538,11 +3538,11 @@ BOOL CMyComboBox::PreTranslateMessage( MSG* pMsg )
{
CString rString;
GetLBText (i, rString);
string tmp = toLower(tStrToUtf8(rString));
wstring tmp = CUtfStringView(toLower(tStrToUtf8(rString))).toWide();
uint size = std::min (_LastString.size(), tmp.size());
if (size > matchSize)
{
if (strncmp(tmp.c_str(), _LastString.c_str(), size) == 0)
if (wcsncmp(tmp.c_str(), _LastString.c_str(), size) == 0)
{
matchItem = i;
matchSize = size;

@ -60,7 +60,7 @@ public:
bool loaded;
private:
std::string _LastString;
std::wstring _LastString;
sint64 _LastStrokeTime;
std::vector<std::string> _data;
void reloadData();

@ -110,7 +110,7 @@ void CImageListEx::addResourceIcon (const char *filename)
index = ImageList.Replace( index, handle);
// Add in the map
std::string name = toLower(NLMISC::CFile::getFilenameWithoutExtension(filename));
std::string name = toLowerAscii(NLMISC::CFile::getFilenameWithoutExtension(filename));
_IconMapString.insert (std::map<string, int>::value_type (name, index));
// Release the icon
@ -136,7 +136,7 @@ int CImageListEx::getImage (int resource) const
int CImageListEx::getImage (const char *filename) const
{
std::string name = toLower(NLMISC::CFile::getFilenameWithoutExtension(filename));
std::string name = toLowerAscii(NLMISC::CFile::getFilenameWithoutExtension(filename));
std::map<string, int>::const_iterator ite = _IconMapString.find (name);
if (ite == _IconMapString.end())
return -1;

@ -167,7 +167,7 @@ void CNameDlg::updateSearchList()
m_nameFilter.UnlockBuffer();
// filter
if (NLMISC::toLower(ig).find(NLMISC::toLower(filter)) != std::string::npos)
if (NLMISC::toLowerAscii(ig).find(NLMISC::toLowerAscii(filter)) != std::string::npos)
{
m_listToName.insert(std::make_pair(j, i));
m_searchList.InsertString(j++, nlUtf8ToTStr(s));

@ -555,7 +555,7 @@ bool CWorldEditorApp::initPath (const std::string &filename, CSplashScreen &spla
string noRecurse;
if (CIXml::getPropertyString (noRecurse, search_path, "NO_RECURSE"))
{
if (toLower(noRecurse) == "true")
if (toBool(noRecurse))
recurse = false;
}
@ -635,14 +635,14 @@ class CMainFrame *getMainFrame ()
std::string standardizePath (const std::string &str)
{
return NLMISC::toLower(NLMISC::CPath::standardizePath (str, true));
return NLMISC::toLowerAscii(NLMISC::CPath::standardizePath (str, true));
}
// ***************************************************************************
std::string formatString (const std::string &str)
{
string copy = NLMISC::toLower(str);
string copy = NLMISC::toLowerAscii(str);
return copy;
}

@ -222,7 +222,7 @@ void CPlugin::drawFaunaGraph(CDisplay &display, const NLLIGO::IPrimitive &grp)
if (!grp.getChild(child, k)) continue;
std::string className;
if (!child->getPropertyByName("class", className)) continue;
if (NLMISC::toLower(className) != FAUNA_PLACE) continue;
if (NLMISC::toLowerAscii(className) != FAUNA_PLACE) continue;
if (_PluginAccess->isSelected(*child))
{
found = true;
@ -239,7 +239,7 @@ void CPlugin::drawFaunaGraph(CDisplay &display, const NLLIGO::IPrimitive &grp)
if (!grp.getChild(child, k)) continue;
std::string className;
if (!child->getPropertyByName("class", className)) continue;
if (NLMISC::toLower(className) != FAUNA_PLACE) continue;
if (NLMISC::toLowerAscii(className) != FAUNA_PLACE) continue;
std::string indexStr;
int index;
if (!child->getPropertyByName("index", indexStr)) continue;

@ -169,7 +169,7 @@ void CSoundPlugin::ReInit()
bool fmodDriver = false;
try
{
fmodDriver = toLower(cf.getVar("DriverSound").asString())=="fmod";
fmodDriver = toLowerAscii(cf.getVar("DriverSound").asString())=="fmod"; // FIXME: Support all drivers
}
catch(...)
{

@ -134,7 +134,7 @@ void makeAnimByRace(const std::string &animSetFile, const std::vector<string> &a
// get the possible anim file name (lowered)
static vector<string> raceAnimNames;
raceAnimNames.clear();
buildRaceAnimNames(raceAnimNames, toLower(CFile::getFilename(animList[i])));
buildRaceAnimNames(raceAnimNames, toLowerAscii(CFile::getFilename(animList[i])));
// For each line of the animSet
uint lastStructLine= 0;
@ -142,7 +142,7 @@ void makeAnimByRace(const std::string &animSetFile, const std::vector<string> &a
for(uint j=0;j<animSetText.size();)
{
string line= animSetText[j];
string lineLwr= toLower(line);
string lineLwr= toLowerAscii(line);
// Find <LOG> TAg? => stop
if(line.find("<LOG>")!=string::npos)

@ -87,7 +87,7 @@ void CAnimCombatState::build(const string &line)
void makeAnimMeleeImpact(const std::string &animSetFile, const set<CAnimCombatSet> &combatAnimSets)
{
// look if this animSetFile is in the combat list to patch
string shortName= NLMISC::toLower(CFile::getFilenameWithoutExtension(animSetFile));
string shortName= NLMISC::toLowerAscii(CFile::getFilenameWithoutExtension(animSetFile));
CAnimCombatSet key;
key.Name= shortName;
set<CAnimCombatSet>::const_iterator it= combatAnimSets.find(key);
@ -125,7 +125,7 @@ void makeAnimMeleeImpact(const std::string &animSetFile, const set<CAnimCombatSe
for(uint j=0;j<animSetText.size();j++)
{
string line= animSetText[j];
string lineLwr= toLower(line);
string lineLwr= toLowerAscii(line);
// Find <LOG> TAg? => stop
if(line.find("<LOG>")!=string::npos)
@ -405,7 +405,7 @@ To generate the anim.txt file, this code has to be inserted in the client, in
if(anim && anim3d)
{
// name
string name= NLMISC::toLower(_AnimationSet->getAnimationName(anim->id()));
string name= NLMISC::toLowerAscii(_AnimationSet->getAnimationName(anim->id()));
if(animName.empty())
animName= name;
else if(!extended)

@ -459,9 +459,9 @@ void CPackageDescription::buildDefaultFileList()
std::vector<std::string> fileList;
NLMISC::CPath::getPathContent(_BnpDirectory,false,false,true,fileList);
for (uint32 i=0;i<fileList.size();++i)
if (NLMISC::toLower(NLMISC::CFile::getExtension(fileList[i]))=="bnp"
|| NLMISC::toLower(NLMISC::CFile::getExtension(fileList[i]))=="snp")
_Categories.addFile("main",NLMISC::toLower(NLMISC::CFile::getFilename(fileList[i])));
if (NLMISC::toLowerAscii(NLMISC::CFile::getExtension(fileList[i]))=="bnp"
|| NLMISC::toLowerAscii(NLMISC::CFile::getExtension(fileList[i]))=="snp")
_Categories.addFile("main",NLMISC::toLowerAscii(NLMISC::CFile::getFilename(fileList[i])));
_Categories.addFile("unpacked","root.bnp");
}

@ -99,16 +99,16 @@ string xmlSpecialChars(string str)
string getFullStdPathNoExt(const string &path)
{
string dir = NLMISC::toLower(NLMISC::CFile::getPath(path));
string file = NLMISC::toLower(NLMISC::CFile::getFilenameWithoutExtension(path));
string dir = NLMISC::toLowerAscii(NLMISC::CFile::getPath(path));
string file = NLMISC::toLowerAscii(NLMISC::CFile::getFilenameWithoutExtension(path));
return dir.empty() ? file : NLMISC::CPath::standardizePath(dir)+file;
}
string getFullStdPath(const string &path)
{
string dir = NLMISC::toLower(NLMISC::CFile::getPath(path));
string file = NLMISC::toLower(NLMISC::CFile::getFilename(path));
string dir = NLMISC::toLowerAscii(NLMISC::CFile::getPath(path));
string file = NLMISC::toLowerAscii(NLMISC::CFile::getFilename(path));
return dir.empty() ? file : NLMISC::CPath::standardizePath(dir)+file;
}
@ -258,7 +258,7 @@ bool CDbNode::epilog()
setEnv("db", Name);
string fullfile = getFullStdPathNoExt(MainFile.empty() ? Name : MainFile);
string filename = NLMISC::toLower(NLMISC::CFile::getFilenameWithoutExtension(fullfile));
string filename = NLMISC::toLowerAscii(NLMISC::CFile::getFilenameWithoutExtension(fullfile));
setEnv("filename", filename);
setEnv("fullfilename", fullfile);
@ -788,14 +788,14 @@ void CDbNode::generateLogContent()
// get file path from this file
string CDbNode::getFileNoExtPath(const std::string& file)
{
string thisPath = NLMISC::CFile::getPath(NLMISC::toLower(getDbFile()));
string filePath = NLMISC::CFile::getPath(NLMISC::toLower(file));
string fileName = NLMISC::CFile::getFilename(NLMISC::toLower(file));
string thisPath = NLMISC::CFile::getPath(NLMISC::toLowerAscii(getDbFile()));
string filePath = NLMISC::CFile::getPath(NLMISC::toLowerAscii(file));
string fileName = NLMISC::CFile::getFilename(NLMISC::toLowerAscii(file));
if (thisPath == filePath)
return CFile::getFilenameWithoutExtension(fileName);
else
return CPath::standardizePath(filePath)+CFile::getFilenameWithoutExtension(NLMISC::toLower(file));
return CPath::standardizePath(filePath)+CFile::getFilenameWithoutExtension(NLMISC::toLowerAscii(file));
}
@ -825,7 +825,7 @@ bool CFileNode::generateProlog()
if (!db->Description.empty())
Hpp << db->Description << "\n";
string filename = NLMISC::toLower(CFile::getFilenameWithoutExtension(Name));
string filename = NLMISC::toLowerAscii(CFile::getFilenameWithoutExtension(Name));
setEnv("fullfilename", getFullStdPathNoExt(Name));
setEnv("filename", filename);
@ -870,7 +870,7 @@ bool CFileNode::generateProlog()
if (SeparatedFlag)
{
string fullfile = getFullStdPathNoExt(db->MainFile.empty() ? db->Name : db->MainFile);
string filename = NLMISC::toLower(NLMISC::CFile::getFilenameWithoutExtension(fullfile));
string filename = NLMISC::toLowerAscii(NLMISC::CFile::getFilenameWithoutExtension(fullfile));
Hpp << "#include \"" << filename << ".h\"\n";
Hpp << "\n";
}
@ -920,7 +920,7 @@ bool CFileNode::generateEpilog()
CDbNode* db = getDbNode();
string fullfile = getFullStdPathNoExt(Name);
string filename = NLMISC::toLower(CFile::getFilenameWithoutExtension(Name));
string filename = NLMISC::toLowerAscii(CFile::getFilenameWithoutExtension(Name));
Hpp.indent();
Hpp << "\n} // End of " << db->Name <<"\n";
@ -948,14 +948,14 @@ bool CFileNode::generateEpilog()
string CFileNode::getFileNoExtPath(const string& file)
{
string thisPath = NLMISC::CFile::getPath(NLMISC::toLower(Name));
string filePath = NLMISC::CFile::getPath(NLMISC::toLower(file));
string fileName = NLMISC::CFile::getFilename(NLMISC::toLower(file));
string thisPath = NLMISC::CFile::getPath(NLMISC::toLowerAscii(Name));
string filePath = NLMISC::CFile::getPath(NLMISC::toLowerAscii(file));
string fileName = NLMISC::CFile::getFilename(NLMISC::toLowerAscii(file));
if (thisPath == filePath)
return CFile::getFilenameWithoutExtension(fileName);
else
return CFile::getFilenameWithoutExtension(NLMISC::toLower(file));
return CFile::getFilenameWithoutExtension(NLMISC::toLowerAscii(file));
}
void CFileNode::writeFile()
@ -1301,7 +1301,7 @@ bool CEnumNode::generateContent()
gen.add("{");
gen.add("return Unknown;");
gen.add("}");
gen.add("const std::map<std::string, "+Name+">::const_iterator\tit = _ValueMap.find(NLMISC::toLower(v));");
gen.add("const std::map<std::string, "+Name+">::const_iterator\tit = _ValueMap.find(NLMISC::toLowerAscii(v));");
gen.add("if (it == _ValueMap.end())");
gen.add("{");
gen.add("nlwarning(\""+Name+"::toString(): string '%s' is not matched, 'Unknown' enum value returned\", v.c_str());");
@ -1318,7 +1318,7 @@ bool CEnumNode::generateContent()
gen.add("for (i=0; i<"+toString(Values.size())+"; ++i)");
gen.add("{");
gen.add("_StrTable["+Name+"Convert[i].Value] = "+Name+"Convert[i].Name;");
gen.add("_ValueMap[NLMISC::toLower(std::string("+Name+"Convert[i].Name))] = "+Name+"Convert[i].Value;");
gen.add("_ValueMap[NLMISC::toLowerAscii(std::string("+Name+"Convert[i].Name))] = "+Name+"Convert[i].Value;");
gen.add("}");
gen.add("_Initialised = true;");

@ -181,7 +181,7 @@ int main(int argc, char* argv[])
if (!zonePath.empty())
{
presentZonePathes.push_back(zonePath);
presentZoneNames.push_back(toLower(zoneNames[l]));
presentZoneNames.push_back(toLowerAscii(zoneNames[l]));
}
}
//

@ -266,7 +266,7 @@ void CIGInfo::load(TShapeCache &shapeCache)
for(uint k = 0; k < IG->getNumInstance(); ++k)
{
std::string shapeName = standardizeShapeName(IG->getShapeName(k));
if (NLMISC::toLower(CFile::getExtension(shapeName)) == "pacs_prim")
if (NLMISC::toLowerAscii(CFile::getExtension(shapeName)) == "pacs_prim")
{
continue;
}

@ -311,10 +311,10 @@ sint main( sint argc, char ** argv )
}
break;
case 1: // code
skill.Code = toUpper(string( ptr ));
skill.Code = toUpperAscii(string( ptr ));
break;
case 2: // parent skill
skill.ParentSkill = toUpper(string( ptr ));
skill.ParentSkill = toUpperAscii(string( ptr ));
break;
case 3: // max skill value
NLMISC::fromString(std::string(ptr), skill.MaxValue);

@ -58,7 +58,7 @@ struct CSheetWordListBuilder : public IWordListBuilder
virtual bool buildWordList(std::vector<string> &allWords, string workSheetFileName)
{
SheetExt= toLower(SheetExt);
SheetExt= toLowerAscii(SheetExt);
// verify the directory is correct
if(!CFile::isDirectory(SheetPath))
@ -78,7 +78,7 @@ struct CSheetWordListBuilder : public IWordListBuilder
for(uint i=0;i<allFiles.size();i++)
{
string fileNameWithoutExt= CFile::getFilenameWithoutExtension(allFiles[i]);
string extension= toLower(CFile::getExtension(allFiles[i]));
string extension= toLowerAscii(CFile::getExtension(allFiles[i]));
// bad extension?
if(extension!=SheetExt)
continue;
@ -86,7 +86,7 @@ struct CSheetWordListBuilder : public IWordListBuilder
if(fileNameWithoutExt.empty()||fileNameWithoutExt[0]=='_')
continue;
// ok, add
allWords.push_back(toLower(fileNameWithoutExt));
allWords.push_back(toLowerAscii(fileNameWithoutExt));
}
return true;
@ -168,7 +168,7 @@ struct CRegionPrimWordListBuilder : public IWordListBuilder
string primName;
if(placeRes[placeId]->getPropertyByName(listProp[cid], primName) && !primName.empty())
{
primName= toLower(primName);
primName= toLowerAscii(primName);
// avoid duplicate
if(allWordSet.insert(primName).second)
{

Loading…
Cancel
Save