Changed: Replaced strlwr by toLower

--HG--
branch : compatibility
This commit is contained in:
kervala 2014-04-24 18:11:16 +02:00
parent ed1a84c99b
commit 3fff8fe467
5 changed files with 7 additions and 11 deletions

View file

@ -205,12 +205,12 @@ namespace NLGUI
CViewRenderer &rVR = *CViewRenderer::getInstance(); CViewRenderer &rVR = *CViewRenderer::getInstance();
if(prop) if(prop)
{ {
string sTmp = NLMISC::strlwr((const char*)prop); string sTmp = NLMISC::toLower((const char*)prop);
_Texture = rVR.createTexture (sTmp, 0, 0, 256, 64, false, false); _Texture = rVR.createTexture (sTmp, 0, 0, 256, 64, false, false);
} }
prop = (char*) xmlGetProp( node, (xmlChar*)"onchange" ); prop = (char*) xmlGetProp( node, (xmlChar*)"onchange" );
if (prop) _AHOnChange = NLMISC::strlwr(prop); if (prop) _AHOnChange = NLMISC::toLower(prop);
prop = (char*) xmlGetProp( node, (xmlChar*)"onchange_params" ); prop = (char*) xmlGetProp( node, (xmlChar*)"onchange_params" );
if (prop) _AHOnChangeParams = string((const char*)prop); if (prop) _AHOnChangeParams = string((const char*)prop);

View file

@ -993,8 +993,7 @@ namespace NLGUI
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
bool CInterfaceElement::convertBool (const char *ptr) bool CInterfaceElement::convertBool (const char *ptr)
{ {
std::string str = ptr; std::string str = toLower(ptr);
NLMISC::strlwr( str );
bool b = false; bool b = false;
fromString( str, b ); fromString( str, b );
return b; return b;

View file

@ -307,8 +307,7 @@ namespace NLGUI
prop = (char*) xmlGetProp( cur, (xmlChar*)"texture" ); prop = (char*) xmlGetProp( cur, (xmlChar*)"texture" );
if (prop) if (prop)
{ {
string TxName = (const char *) prop; string TxName = toLower((const char *) prop);
TxName = strlwr (TxName);
setTexture (TxName); setTexture (TxName);
//CInterfaceManager *pIM = CInterfaceManager::getInstance(); //CInterfaceManager *pIM = CInterfaceManager::getInstance();
//CViewRenderer &rVR = *CViewRenderer::getInstance(); //CViewRenderer &rVR = *CViewRenderer::getInstance();
@ -450,7 +449,6 @@ namespace NLGUI
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
void CViewBitmap::setTexture(const std::string & TxName) void CViewBitmap::setTexture(const std::string & TxName)
{ {
_TextureId.setTexture (TxName.c_str (), _TxtOffsetX, _TxtOffsetY, _TxtWidth, _TxtHeight, false); _TextureId.setTexture (TxName.c_str (), _TxtOffsetX, _TxtOffsetY, _TxtWidth, _TxtHeight, false);
} }

View file

@ -894,11 +894,11 @@ namespace NLGUI
{ {
if (sGlobalTextureName.empty()) return -1; if (sGlobalTextureName.empty()) return -1;
// Look if already existing // Look if already existing
string sLwrGTName = strlwr(sGlobalTextureName); string sLwrGTName = toLower(sGlobalTextureName);
TGlobalTextureList::iterator ite = _GlobalTextures.begin(); TGlobalTextureList::iterator ite = _GlobalTextures.begin();
while (ite != _GlobalTextures.end()) while (ite != _GlobalTextures.end())
{ {
std::string sText = strlwr(ite->Name); std::string sText = toLower(ite->Name);
if (sText == sLwrGTName) if (sText == sLwrGTName)
break; break;
ite++; ite++;

View file

@ -312,8 +312,7 @@ void CSBrickSheet::build (const NLGEORGES::UFormElm &root)
BrickRequiredFlags= 0; BrickRequiredFlags= 0;
for(i=0;i<Properties.size();i++) for(i=0;i<Properties.size();i++)
{ {
string text= Properties[i].Text; string text= NLMISC::toLower(Properties[i].Text);
strlwr(text);
// If the property is an opening property // If the property is an opening property
const string openingProp[]= { "opening_1:", "opening_2:", "opening_3:" }; const string openingProp[]= { "opening_1:", "opening_2:", "opening_3:" };