From 380bac572849b90a01c67649fae8397423468f7b Mon Sep 17 00:00:00 2001 From: kervala Date: Fri, 13 Nov 2015 16:22:49 +0100 Subject: [PATCH] Changed: Replaced some NLMISC::strlwr by NLMISC::toLower --- code/nel/src/gui/ctrl_scroll.cpp | 6 +-- code/nel/src/gui/group_editbox.cpp | 6 +-- code/nel/src/gui/group_html.cpp | 23 +++++------ code/nel/src/gui/interface_anim.cpp | 3 +- code/nel/src/gui/interface_group.cpp | 3 +- code/nel/src/gui/interface_options.cpp | 3 +- code/nel/src/gui/interface_parser.cpp | 20 ++++++--- code/nel/src/gui/view_pointer.cpp | 39 ++++++------------ code/nel/src/gui/view_renderer.cpp | 9 ++-- code/ryzom/client/src/animation_fx.cpp | 3 +- code/ryzom/client/src/auto_anim.cpp | 2 +- code/ryzom/client/src/character_cl.cpp | 4 +- code/ryzom/client/src/client.cpp | 2 +- code/ryzom/client/src/commands.cpp | 2 +- code/ryzom/client/src/continent.cpp | 6 +-- code/ryzom/client/src/continent_manager.cpp | 2 +- code/ryzom/client/src/door_manager.cpp | 10 ++--- .../client/src/entity_animation_manager.cpp | 2 +- code/ryzom/client/src/ground_fx_manager.cpp | 2 +- code/ryzom/client/src/ig_callback.cpp | 2 +- code/ryzom/client/src/init.cpp | 5 +-- .../client/src/interface_v3/dbctrl_sheet.cpp | 41 ++++++++----------- .../client/src/interface_v3/group_compas.cpp | 4 +- .../client/src/interface_v3/guild_manager.cpp | 2 +- .../src/interface_v3/interface_3d_scene.cpp | 17 +++----- .../src/interface_v3/interface_manager.cpp | 4 +- .../src/interface_v3/inventory_manager.cpp | 2 +- .../client/src/interface_v3/music_player.cpp | 2 +- .../client/src/interface_v3/people_list.cpp | 4 +- .../src/interface_v3/sbrick_manager.cpp | 5 +-- .../src/interface_v3/view_bitmap_faber_mp.cpp | 3 +- .../client/src/interface_v3/view_radar.cpp | 6 +-- .../client/src/mesh_camera_col_manager.cpp | 2 +- code/ryzom/client/src/net_manager.cpp | 4 +- code/ryzom/client/src/outpost.cpp | 2 +- code/ryzom/client/src/pacs_client.cpp | 4 +- code/ryzom/client/src/sky.cpp | 2 +- code/ryzom/client/src/streamable_ig.cpp | 14 +++---- .../client/src/string_manager_client.cpp | 12 ++---- code/ryzom/common/src/game_share/fame.cpp | 15 ++----- .../time_weather_season/weather_manager.cpp | 4 +- .../weather_setup_sheet_base.cpp | 6 +-- 42 files changed, 129 insertions(+), 180 deletions(-) diff --git a/code/nel/src/gui/ctrl_scroll.cpp b/code/nel/src/gui/ctrl_scroll.cpp index c29f73fea..da42cd40b 100644 --- a/code/nel/src/gui/ctrl_scroll.cpp +++ b/code/nel/src/gui/ctrl_scroll.cpp @@ -519,17 +519,17 @@ namespace NLGUI // Read Action handlers prop = (char*) xmlGetProp( node, (xmlChar*)"onscroll" ); - if (prop) _AHOnScroll = NLMISC::strlwr(prop.str()); + if (prop) _AHOnScroll = NLMISC::toLower(prop.str()); prop = (char*) xmlGetProp( node, (xmlChar*)"params" ); if (prop) _AHOnScrollParams = string((const char*)prop); // prop = (char*) xmlGetProp( node, (xmlChar*)"onscrollend" ); - if (prop) _AHOnScrollEnd = NLMISC::strlwr(prop.str()); + if (prop) _AHOnScrollEnd = NLMISC::toLower(prop.str()); prop = (char*) xmlGetProp( node, (xmlChar*)"end_params" ); if (prop) _AHOnScrollEndParams = string((const char*)prop); // prop = (char*) xmlGetProp( node, (xmlChar*)"onscrollcancel" ); - if (prop) _AHOnScrollCancel = NLMISC::strlwr(prop.str()); + if (prop) _AHOnScrollCancel = NLMISC::toLower(prop.str()); prop = (char*) xmlGetProp( node, (xmlChar*)"cancel_params" ); if (prop) _AHOnScrollCancelParams = string((const char*)prop); diff --git a/code/nel/src/gui/group_editbox.cpp b/code/nel/src/gui/group_editbox.cpp index f6d909119..c96c27b46 100644 --- a/code/nel/src/gui/group_editbox.cpp +++ b/code/nel/src/gui/group_editbox.cpp @@ -606,11 +606,7 @@ namespace NLGUI } prop = (char*) xmlGetProp( cur, (xmlChar*)"menu_r" ); - if (prop) - { - string tmp = (const char *) prop; - _ListMenuRight = strlwr(tmp); - } + if (prop) _ListMenuRight = toLower((const char *) prop); prop = (char*) xmlGetProp( cur, (xmlChar*)"max_historic" ); if (prop) fromString((const char*)prop, _MaxHistoric); diff --git a/code/nel/src/gui/group_html.cpp b/code/nel/src/gui/group_html.cpp index 4df0b0ee5..9eea81220 100644 --- a/code/nel/src/gui/group_html.cpp +++ b/code/nel/src/gui/group_html.cpp @@ -772,8 +772,7 @@ namespace NLGUI cellParams.NoWrap = true; \ if (present[prefix##_ALIGN] && value[prefix##_ALIGN]) \ { \ - string align = value[prefix##_ALIGN]; \ - align = strlwr(align); \ + string align = toLower(value[prefix##_ALIGN]); \ if (align == "left") \ cellParams.Align = CGroupCell::Left; \ if (align == "center") \ @@ -783,8 +782,7 @@ namespace NLGUI } \ if (present[prefix##_VALIGN] && value[prefix##_VALIGN]) \ { \ - string align = value[prefix##_VALIGN]; \ - align = strlwr(align); \ + string align = toLower(value[prefix##_VALIGN]); \ if (align == "top") \ cellParams.VAlign = CGroupCell::Top; \ if (align == "middle") \ @@ -1182,7 +1180,7 @@ namespace NLGUI if (it != styles.end()) { string image = it->second; - string::size_type texExt = strlwr(image).find("url("); + string::size_type texExt = toLower(image).find("url("); // Url image if (texExt != string::npos) // Remove url() @@ -1321,8 +1319,7 @@ namespace NLGUI if (present[MY_HTML_INPUT_ALT] && value[MY_HTML_INPUT_ALT]) tooltip = value[MY_HTML_INPUT_ALT]; - string type = value[MY_HTML_INPUT_TYPE]; - type = strlwr (type); + string type = toLower(value[MY_HTML_INPUT_TYPE]); if (type == "image") { // The submit button @@ -1668,7 +1665,7 @@ namespace NLGUI { nlinfo("found background-image %s", it->second.c_str()); string image = (*it).second; - string::size_type texExt = strlwr(image).find("url("); + string::size_type texExt = toLower(image).find("url("); // Url image if (texExt != string::npos) { @@ -3826,7 +3823,7 @@ namespace NLGUI // folder used for images cache static const string cacheDir = "cache"; - string::size_type protocolPos = strlwr(result).find("://"); + string::size_type protocolPos = toLower(result).find("://"); if (protocolPos != string::npos) { @@ -3840,7 +3837,7 @@ namespace NLGUI else { // Url is a file ? - if (strlwr(result).find("file:") == 0) + if (toLower(result).find("file:") == 0) { result = result.substr(5, result.size()-5); } @@ -3857,7 +3854,7 @@ namespace NLGUI { // Normalize the path if (isUrl) - //result = "file:"+strlwr(CPath::standardizePath (CPath::getFullPath (CFile::getPath(result)))+CFile::getFilename(result));*/ + //result = "file:"+toLower(CPath::standardizePath (CPath::getFullPath (CFile::getPath(result)))+CFile::getFilename(result));*/ result = "file:/"+tmp; else result = tmp; @@ -4114,7 +4111,7 @@ namespace NLGUI void CGroupHTML::doBrowseLocalFile(const std::string &uri) { std::string filename; - if (strlwr(uri).find("file:/") == 0) + if (toLower(uri).find("file:/") == 0) { filename = uri.substr(6, uri.size() - 6); } @@ -4978,7 +4975,7 @@ namespace NLGUI else if (it->first == "text-decoration" || it->first == "text-decoration-line") { - std::string prop(strlwr(it->second)); + std::string prop(toLower(it->second)); style.Underlined = (prop.find("underline") != std::string::npos); style.StrikeThrough = (prop.find("line-through") != std::string::npos); } diff --git a/code/nel/src/gui/interface_anim.cpp b/code/nel/src/gui/interface_anim.cpp index edd96e1cf..4b230bb25 100644 --- a/code/nel/src/gui/interface_anim.cpp +++ b/code/nel/src/gui/interface_anim.cpp @@ -55,8 +55,7 @@ namespace NLGUI if (ptr) _Dynamic = CInterfaceElement::convertBool (ptr); ptr = xmlGetProp (cur, (xmlChar*)"type"); - string sTmp = ptr.str(); - sTmp = strlwr(sTmp); + string sTmp = toLower(ptr.str()); if (sTmp == "linear") _Type = Track_Linear; else if (sTmp == "bezier") diff --git a/code/nel/src/gui/interface_group.cpp b/code/nel/src/gui/interface_group.cpp index 46df4c816..f2a695436 100644 --- a/code/nel/src/gui/interface_group.cpp +++ b/code/nel/src/gui/interface_group.cpp @@ -312,8 +312,7 @@ namespace NLGUI ptr = (char*) xmlGetProp( cur, (xmlChar*)"max_sizeparent" ); if (ptr) { - string idparent = ptr.str(); - idparent = NLMISC::strlwr(idparent); + string idparent = NLMISC::toLower(ptr.str()); if (idparent != "parent") { if (parentGroup) diff --git a/code/nel/src/gui/interface_options.cpp b/code/nel/src/gui/interface_options.cpp index 3de015d65..1daef83cb 100644 --- a/code/nel/src/gui/interface_options.cpp +++ b/code/nel/src/gui/interface_options.cpp @@ -127,8 +127,7 @@ namespace NLGUI // *************************************************************************** const CInterfaceOptionValue &CInterfaceOptions::getValue(const string &sParamName) const { - string sLwrParamName = strlwr (sParamName); - std::map::const_iterator it = _ParamValue.find (sLwrParamName); + std::map::const_iterator it = _ParamValue.find (toLower(sParamName)); if (it != _ParamValue.end()) return it->second; else diff --git a/code/nel/src/gui/interface_parser.cpp b/code/nel/src/gui/interface_parser.cpp index 1dbf62d51..02434e66a 100644 --- a/code/nel/src/gui/interface_parser.cpp +++ b/code/nel/src/gui/interface_parser.cpp @@ -1359,6 +1359,9 @@ namespace NLGUI { CXMLAutoPtr ptr((const char*) xmlGetProp( cur, (xmlChar*)"node" )); if (!ptr) return false; + + string stmp2 = toLower(string((const char*)ptr)); + CInterfaceElement *pEltFound = NULL; std::vector< CWidgetManager::SMasterGroup > &_MasterGroups = CWidgetManager::getInstance()->getAllMasterGroup(); for (uint32 i = 0; i < _MasterGroups.size(); ++i) @@ -1367,8 +1370,8 @@ namespace NLGUI for (uint32 j = 0; j < rMG.Group->getGroups().size(); ++j) { CInterfaceGroup *pIG = rMG.Group->getGroups()[j]; - string stmp = strlwr(pIG->getId().substr(pIG->getId().rfind(':')+1,pIG->getId().size())); - string stmp2 = strlwr(string((const char*)ptr)); + string stmp = toLower(pIG->getId().substr(pIG->getId().rfind(':')+1,pIG->getId().size())); + if (stmp == stmp2) { pEltFound = pIG; @@ -1408,6 +1411,9 @@ namespace NLGUI { CXMLAutoPtr ptr((const char*) xmlGetProp( cur, (xmlChar*)"node" )); if (!ptr) return false; + + string stmp2 = toLower(string((const char*)ptr)); + std::vector< CWidgetManager::SMasterGroup > &_MasterGroups = CWidgetManager::getInstance()->getAllMasterGroup(); CInterfaceElement *pEltFound = NULL; for (uint32 i = 0; i < _MasterGroups.size(); ++i) @@ -1416,8 +1422,7 @@ namespace NLGUI for (uint32 j = 0; j < rMG.Group->getGroups().size(); ++j) { CInterfaceGroup *pIG = rMG.Group->getGroups()[j]; - string stmp = strlwr(pIG->getId().substr(pIG->getId().rfind(':')+1,pIG->getId().size())); - string stmp2 = strlwr(string((const char*)ptr)); + string stmp = toLower(pIG->getId().substr(pIG->getId().rfind(':')+1,pIG->getId().size())); if (stmp == stmp2) { pEltFound = pIG; @@ -1600,6 +1605,9 @@ namespace NLGUI { CXMLAutoPtr ptr((const char*) xmlGetProp( cur, (xmlChar*)"node" )); if (!ptr) return false; + + string stmp2 = toLower(string((const char*)ptr)); + std::vector< CWidgetManager::SMasterGroup > &_MasterGroups = CWidgetManager::getInstance()->getAllMasterGroup(); CInterfaceElement *pEltFound = NULL; for (uint32 i = 0; i < _MasterGroups.size(); ++i) @@ -1608,8 +1616,8 @@ namespace NLGUI for (uint32 j = 0; j < rMG.Group->getGroups().size(); ++j) { CInterfaceGroup *pIG = rMG.Group->getGroups()[j]; - string stmp = strlwr(pIG->getId().substr(pIG->getId().rfind(':')+1,pIG->getId().size())); - string stmp2 = strlwr(string((const char*)ptr)); + string stmp = toLower(pIG->getId().substr(pIG->getId().rfind(':')+1,pIG->getId().size())); + if (stmp == stmp2) { pEltFound = pIG; diff --git a/code/nel/src/gui/view_pointer.cpp b/code/nel/src/gui/view_pointer.cpp index bc69ebdaa..da8d730fc 100644 --- a/code/nel/src/gui/view_pointer.cpp +++ b/code/nel/src/gui/view_pointer.cpp @@ -84,56 +84,43 @@ namespace NLGUI _OffsetY = getY(); prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_default"); - if (prop) _TxDefault = (const char *) prop; - _TxDefault = NLMISC::strlwr (_TxDefault); + if (prop) _TxDefault = NLMISC::toLower ((const char *) prop); prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_move_window"); - if (prop) _TxMoveWindow = (const char *) prop; - _TxMoveWindow = NLMISC::strlwr (_TxMoveWindow); + if (prop) _TxMoveWindow = NLMISC::toLower ((const char *) prop); prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_resize_BR_TL"); - if (prop) _TxResizeBRTL = (const char *) prop; - _TxResizeBRTL = NLMISC::strlwr (_TxResizeBRTL); + if (prop) _TxResizeBRTL = NLMISC::toLower ((const char *) prop); prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_resize_BL_TR"); - if (prop) _TxResizeBLTR = (const char *) prop; - _TxResizeBLTR = NLMISC::strlwr (_TxResizeBLTR); + if (prop) _TxResizeBLTR = NLMISC::toLower ((const char *) prop); prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_resize_TB"); - if (prop) _TxResizeTB = (const char *) prop; - _TxResizeTB = NLMISC::strlwr (_TxResizeTB); + if (prop) _TxResizeTB = NLMISC::toLower ((const char *) prop); prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_resize_LR"); - if (prop) _TxResizeLR = (const char *) prop; - _TxResizeLR = NLMISC::strlwr (_TxResizeLR); + if (prop) _TxResizeLR = NLMISC::toLower ((const char *) prop); prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_rotate"); - if (prop) _TxRotate = (const char *) prop; - _TxRotate = NLMISC::strlwr (_TxRotate); + if (prop) _TxRotate = NLMISC::toLower ((const char *) prop); prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_scale"); - if (prop) _TxScale = (const char *) prop; - _TxScale = NLMISC::strlwr (_TxScale); + if (prop) _TxScale = NLMISC::toLower ((const char *) prop); prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_colpick"); - if (prop) _TxColPick = (const char *) prop; - _TxColPick = NLMISC::strlwr (_TxColPick); + if (prop) _TxColPick = NLMISC::toLower ((const char *) prop); prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_pan"); - if (prop) _TxPan = (const char *) prop; - _TxPan = NLMISC::strlwr (_TxPan); + if (prop) _TxPan = NLMISC::toLower ((const char *) prop); prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_can_pan"); - if (prop) _TxCanPan = (const char *) prop; - _TxCanPan = NLMISC::strlwr (_TxCanPan); + if (prop) _TxCanPan = NLMISC::toLower ((const char *) prop); prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_pan_r2"); - if (prop) _TxPanR2 = (const char *) prop; - _TxPanR2 = NLMISC::strlwr (_TxPanR2); + if (prop) _TxPanR2 = NLMISC::toLower ((const char *) prop); prop = (char*) xmlGetProp (cur, (xmlChar*)"tx_can_pan_r2"); - if (prop) _TxCanPanR2 = (const char *) prop; - _TxCanPanR2 = NLMISC::strlwr (_TxCanPanR2); + if (prop) _TxCanPanR2 = NLMISC::toLower ((const char *) prop); prop = (char*) xmlGetProp (cur, (xmlChar*)"color"); if (prop) _Color = convertColor(prop); diff --git a/code/nel/src/gui/view_renderer.cpp b/code/nel/src/gui/view_renderer.cpp index 6e6675599..0b4d837f3 100644 --- a/code/nel/src/gui/view_renderer.cpp +++ b/code/nel/src/gui/view_renderer.cpp @@ -854,12 +854,11 @@ namespace NLGUI return; } // Look if already existing - string sLwrGTName = strlwr(sGlobalTextureName); + string sLwrGTName = toLower(sGlobalTextureName); TGlobalTextureList::iterator ite = _GlobalTextures.begin(); while (ite != _GlobalTextures.end()) { - std::string sText = strlwr(ite->Name); - if (sText == sLwrGTName) + if (toLower(ite->Name) == sLwrGTName) break; ite++; } @@ -984,11 +983,11 @@ namespace NLGUI */ NL3D::UTexture *CViewRenderer::getGlobalTexture(const std::string &name) { - string sLwrGTName = strlwr(name); + string sLwrGTName = NLMISC::toLower(name); TGlobalTextureList::iterator ite = _GlobalTextures.begin(); while (ite != _GlobalTextures.end()) { - std::string sText = strlwr(ite->Name); + std::string sText = NLMISC::toLower(ite->Name); if (sText == sLwrGTName) break; ite++; diff --git a/code/ryzom/client/src/animation_fx.cpp b/code/ryzom/client/src/animation_fx.cpp index ee4016b67..7be1a79a9 100644 --- a/code/ryzom/client/src/animation_fx.cpp +++ b/code/ryzom/client/src/animation_fx.cpp @@ -61,8 +61,7 @@ void CAnimationFX::buildTrack(NL3D::UAnimationSet *as) nlassert(Sheet != NULL); if (!as) return; if (Sheet->TrajectoryAnim.empty()) return; - std::string animName = Sheet->TrajectoryAnim; - NLMISC::strlwr(animName); + std::string animName = NLMISC::toLower(Sheet->TrajectoryAnim); uint id = as->getAnimationIdByName(animName); NL3D::UAnimation *anim = NULL; if (id != NL3D::UAnimationSet::NotFound) diff --git a/code/ryzom/client/src/auto_anim.cpp b/code/ryzom/client/src/auto_anim.cpp index 5776b285c..5cc21305a 100644 --- a/code/ryzom/client/src/auto_anim.cpp +++ b/code/ryzom/client/src/auto_anim.cpp @@ -81,7 +81,7 @@ void initAutoAnimation() file.getline(line, 512); // Read the animation file - string animName = strlwr (CFile::getFilenameWithoutExtension(line)); + string animName = toLower(CFile::getFilenameWithoutExtension(line)); uint id = AutoAnimSet->addAnimation (line, animName.c_str ()); if (id == UAnimationSet::NotFound) { diff --git a/code/ryzom/client/src/character_cl.cpp b/code/ryzom/client/src/character_cl.cpp index f4892eb70..029fd9486 100644 --- a/code/ryzom/client/src/character_cl.cpp +++ b/code/ryzom/client/src/character_cl.cpp @@ -610,7 +610,7 @@ uint32 CCharacterCL::buildEquipment(const CCharacterSheet::CEquipment &slot, SLO { // IS the item a valid one ? CSheetId itemId; - if(itemId.buildSheetId(NLMISC::strlwr(slot.getItem()))) + if(itemId.buildSheetId(NLMISC::toLower(slot.getItem()))) { // Is it stored in the database ? CEntitySheet *entitySheet = SheetMngr.get(itemId); @@ -1098,7 +1098,7 @@ string CCharacterCL::automatonType() const // virtual //----------------------------------------------- void CCharacterCL::computeAutomaton() { - _CurrentAutomaton = automatonType() + "_" + NLMISC::strlwr(MBEHAV::modeToString(_Mode)) + ".automaton"; + _CurrentAutomaton = automatonType() + "_" + NLMISC::toLower(MBEHAV::modeToString(_Mode)) + ".automaton"; }// computeAutomaton // diff --git a/code/ryzom/client/src/client.cpp b/code/ryzom/client/src/client.cpp index be7cf1647..a312c3978 100644 --- a/code/ryzom/client/src/client.cpp +++ b/code/ryzom/client/src/client.cpp @@ -520,7 +520,7 @@ int main(int argc, char **argv) uint i; for (i=0; i this zone should be a ZC. - string outpostZone = strlwr(CFile::getFilenameWithoutExtension(ZCList[j].Name)); + string outpostZone = toLower(CFile::getFilenameWithoutExtension(ZCList[j].Name)); if(igZone == outpostZone) { nlctassert(RZ_MAX_BUILDING_PER_OUTPOST==4); @@ -788,7 +788,7 @@ void CContinent::reloadFogMap() const R2::CScenarioEntryPoints::CCompleteIsland *completeIsland = R2::CScenarioEntryPoints::getInstance().getCompleteIslandFromCoords(CVector2f((float) UserEntity->pos().x, (float) UserEntity->pos().y)); if (completeIsland) { - std::string islandName = strlwr(completeIsland->Island); + std::string islandName = toLower(completeIsland->Island); std::string::size_type lastPos = islandName.find_last_of("_"); if (lastPos != std::string::npos) { diff --git a/code/ryzom/client/src/continent_manager.cpp b/code/ryzom/client/src/continent_manager.cpp index 87172ce1a..ddc4bff89 100644 --- a/code/ryzom/client/src/continent_manager.cpp +++ b/code/ryzom/client/src/continent_manager.cpp @@ -183,7 +183,7 @@ void CContinentManager::preloadSheets() for (i = 0; i < ws->ContLocs.size(); ++i) { const SContLoc &clTmp = ws->ContLocs[i]; - std::string continentSheetName = NLMISC::strlwr(clTmp.ContinentName); + std::string continentSheetName = NLMISC::toLower(clTmp.ContinentName); if (continentSheetName.find(".continent") == std::string::npos) { continentSheetName += ".continent"; diff --git a/code/ryzom/client/src/door_manager.cpp b/code/ryzom/client/src/door_manager.cpp index 8ac8aeeb5..543d7b415 100644 --- a/code/ryzom/client/src/door_manager.cpp +++ b/code/ryzom/client/src/door_manager.cpp @@ -248,8 +248,7 @@ void CDoorManager::SDoor::checkToClose() std::string CDoorManager::transformName (uint /* index */, const std::string &/* instanceName */, const std::string &shapeName) { if (shapeName.rfind('.') == string::npos) return shapeName; - string sExt = shapeName.substr(shapeName.rfind('.')+1,shapeName.size()); - sExt = strlwr(sExt); + string sExt = toLower(shapeName.substr(shapeName.rfind('.')+1,shapeName.size())); if (sExt != "pacs_prim") return shapeName; return ""; // Do not load a pacs prim as a mesh... } @@ -266,8 +265,7 @@ void CDoorManager::loadedCallback (NL3D::UInstanceGroup *ig) string sShapeName = ig->getShapeName(k); if (sShapeName.rfind('.') == string::npos) continue; - string sExt = sShapeName.substr(sShapeName.rfind('.')+1,sShapeName.size()); - sExt = strlwr(sExt); + string sExt = toLower(sShapeName.substr(sShapeName.rfind('.')+1,sShapeName.size())); if (sExt != "pacs_prim") continue; // Check if the pacs_prim is a door detection @@ -349,7 +347,7 @@ void CDoorManager::loadedCallback (NL3D::UInstanceGroup *ig) case SDoor::Matis3PartBourgeon: { string sDebug = ig->getShapeName(i); - sDebug = strlwr(sDebug.substr(sDebug.rfind('_')+1,sDebug.size())); + sDebug = toLower(sDebug.substr(sDebug.rfind('_')+1,sDebug.size())); if (sDebug == "gauche") pDoor->Instances[0] = i; else if (sDebug == "droite") @@ -362,7 +360,7 @@ void CDoorManager::loadedCallback (NL3D::UInstanceGroup *ig) case SDoor::Zorai2Part: { string sDebug = ig->getShapeName(i); - sDebug = strlwr(sDebug.substr(sDebug.rfind('_')+1,sDebug.size())); + sDebug = toLower(sDebug.substr(sDebug.rfind('_')+1,sDebug.size())); if (sDebug == "gauche") pDoor->Instances[0] = i; else if (sDebug == "droite") diff --git a/code/ryzom/client/src/entity_animation_manager.cpp b/code/ryzom/client/src/entity_animation_manager.cpp index db1eccb01..98a56cc3c 100644 --- a/code/ryzom/client/src/entity_animation_manager.cpp +++ b/code/ryzom/client/src/entity_animation_manager.cpp @@ -205,7 +205,7 @@ void CEntityAnimationManager::load(NLMISC::IProgressCallback &/* progress */, bo for (uint32 i = 0; i < pASLS->AnimSetList.size(); ++i) { CAnimationSet as; - string sTmp = strlwr(pASLS->AnimSetList[i].Name); + string sTmp = toLower(pASLS->AnimSetList[i].Name); sTmp = sTmp.substr(0,sTmp.rfind('.')); pair::iterator, bool> it; it = _AnimSet.insert(pair(sTmp,as)); diff --git a/code/ryzom/client/src/ground_fx_manager.cpp b/code/ryzom/client/src/ground_fx_manager.cpp index f13309183..c0650a38e 100644 --- a/code/ryzom/client/src/ground_fx_manager.cpp +++ b/code/ryzom/client/src/ground_fx_manager.cpp @@ -520,7 +520,7 @@ void CGroundFXManager::update(const NLMISC::CVectorD &camPos) } if (!fxName.empty()) { - stdFXName = NLMISC::strlwr(NLMISC::CFile::getFilenameWithoutExtension(fxName)); + stdFXName = NLMISC::toLower(NLMISC::CFile::getFilenameWithoutExtension(fxName)); } // is an fx already attached to the entity ? if (_SortedInstances[k]->HasFX) diff --git a/code/ryzom/client/src/ig_callback.cpp b/code/ryzom/client/src/ig_callback.cpp index 410a690cd..49b790d77 100644 --- a/code/ryzom/client/src/ig_callback.cpp +++ b/code/ryzom/client/src/ig_callback.cpp @@ -197,7 +197,7 @@ void CIGCallback::CIGInstance::instanceGroupAdded() uint numInstances = _IG->getNumInstance(); for(uint k = 0; k < numInstances; ++k) { - TPacsPrimMap::iterator pbIt = PacsPrims.find(NLMISC::strlwr(NLMISC::CFile::getFilenameWithoutExtension(_IG->getShapeName(k)))); + TPacsPrimMap::iterator pbIt = PacsPrims.find(NLMISC::toLower(NLMISC::CFile::getFilenameWithoutExtension(_IG->getShapeName(k)))); if (pbIt != PacsPrims.end()) { // compute orientation and position diff --git a/code/ryzom/client/src/init.cpp b/code/ryzom/client/src/init.cpp index 3a51b82a0..6a6120d1c 100644 --- a/code/ryzom/client/src/init.cpp +++ b/code/ryzom/client/src/init.cpp @@ -505,8 +505,7 @@ void checkDriverVersion() uint i; for (i=0; i< sizeofarray(driversVersion); i++) { - string lwr = deviceName; - strlwr(lwr); + string lwr = toLower(deviceName); if ((lwr.find (driversTest[i])!=string::npos) && (driversNTest[i]==NULL || lwr.find (driversNTest[i])==string::npos)) { if (driverVersion < driversVersion[i]) @@ -1290,7 +1289,7 @@ void initBotObjectSelection() { // IS the item a valid one ? CSheetId itemId; - if(itemId.buildSheetId(NLMISC::strlwr(strShape))) + if(itemId.buildSheetId(NLMISC::toLower(strShape))) { // Get this item sheet ? CItemSheet *itemSheet= dynamic_cast(SheetMngr.get(itemId)); diff --git a/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp b/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp index 68ceb7bf0..8d913a1a8 100644 --- a/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp +++ b/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp @@ -333,29 +333,29 @@ bool CCtrlSheetInfo::parseCtrlInfo(xmlNodePtr cur, CInterfaceGroup * /* parentGr prop = (char*) xmlGetProp( cur, (xmlChar*)"nature" ); if (prop) { - if (NLMISC::strlwr(prop.str()) == "item") + if (NLMISC::toLower(prop.str()) == "item") _Type = CCtrlSheetInfo::SheetType_Item; - else if (NLMISC::strlwr(prop.str()) == "pact") + else if (NLMISC::toLower(prop.str()) == "pact") _Type = CCtrlSheetInfo::SheetType_Pact; - else if (NLMISC::strlwr(prop.str()) == "skill") + else if (NLMISC::toLower(prop.str()) == "skill") _Type = CCtrlSheetInfo::SheetType_Skill; - else if (NLMISC::strlwr(prop.str()) == "auto") + else if (NLMISC::toLower(prop.str()) == "auto") _Type = CCtrlSheetInfo::SheetType_Auto; - else if (NLMISC::strlwr(prop.str()) == "macro") + else if (NLMISC::toLower(prop.str()) == "macro") _Type = CCtrlSheetInfo::SheetType_Macro; - else if (NLMISC::strlwr(prop.str()) == "guild_flag") + else if (NLMISC::toLower(prop.str()) == "guild_flag") _Type = CCtrlSheetInfo::SheetType_GuildFlag; - else if (NLMISC::strlwr(prop.str()) == "mission") + else if (NLMISC::toLower(prop.str()) == "mission") _Type = CCtrlSheetInfo::SheetType_Mission; - else if (NLMISC::strlwr(prop.str()) == "sbrick") + else if (NLMISC::toLower(prop.str()) == "sbrick") _Type = CCtrlSheetInfo::SheetType_SBrick; - else if (NLMISC::strlwr(prop.str()) == "sphraseid") + else if (NLMISC::toLower(prop.str()) == "sphraseid") _Type = CCtrlSheetInfo::SheetType_SPhraseId; - else if (NLMISC::strlwr(prop.str()) == "sphrase") + else if (NLMISC::toLower(prop.str()) == "sphrase") _Type = CCtrlSheetInfo::SheetType_SPhrase; - else if (NLMISC::strlwr(prop.str()) == "elevator_destination") + else if (NLMISC::toLower(prop.str()) == "elevator_destination") _Type = CCtrlSheetInfo::SheetType_ElevatorDestination; - else if (NLMISC::strlwr(prop.str()) == "outpost_building") + else if (NLMISC::toLower(prop.str()) == "outpost_building") _Type = CCtrlSheetInfo::SheetType_OutpostBuilding; } @@ -363,8 +363,7 @@ bool CCtrlSheetInfo::parseCtrlInfo(xmlNodePtr cur, CInterfaceGroup * /* parentGr prop = (char*) xmlGetProp( cur, (xmlChar*)"tx_noitem" ); if (prop) { - string TxName = (const char *) prop; - TxName = strlwr (TxName); + string TxName = toLower((const char *) prop); CViewRenderer &rVR = *CViewRenderer::getInstance(); _DispNoSheetBmpId = rVR.getTextureIdFromName (TxName); } @@ -410,27 +409,23 @@ bool CCtrlSheetInfo::parseCtrlInfo(xmlNodePtr cur, CInterfaceGroup * /* parentGr prop = (char*) xmlGetProp( cur, (xmlChar*)"menu_l" ); if (prop) { - string tmp = (const char *) prop; - _ListMenuLeft = strlwr(tmp); + _ListMenuLeft = toLower((const char *) prop); } prop = (char*) xmlGetProp( cur, (xmlChar*)"menu_r" ); if (prop) { - string tmp = (const char *) prop; - _ListMenuRight = strlwr(tmp); + _ListMenuRight = toLower((const char *) prop); } prop = (char*) xmlGetProp( cur, (xmlChar*)"menu_r_empty_slot" ); if (prop) { - string tmp = (const char *) prop; - _ListMenuRightEmptySlot = strlwr(tmp); + _ListMenuRightEmptySlot = toLower((const char *) prop); } // list menu on both clicks prop = (char*) xmlGetProp( cur, (xmlChar*)"menu_b" ); if (prop) { - string tmp = (const char *) prop; - setListMenuBoth(strlwr(tmp)); + setListMenuBoth(toLower((const char *) prop)); } // _BrickTypeBitField @@ -1745,7 +1740,7 @@ void CDBCtrlSheet::resetCharBitmaps() void CDBCtrlSheet::setupCharBitmaps(sint32 maxW, sint32 maxLine, sint32 maxWChar, bool topDown) { // Use the optString for the Macro name - _OptString = strlwr(_OptString); + _OptString = toLower(_OptString); CInterfaceManager *pIM = CInterfaceManager::getInstance(); CViewRenderer &rVR = *CViewRenderer::getInstance(); diff --git a/code/ryzom/client/src/interface_v3/group_compas.cpp b/code/ryzom/client/src/interface_v3/group_compas.cpp index d4d0631ce..590bf916b 100644 --- a/code/ryzom/client/src/interface_v3/group_compas.cpp +++ b/code/ryzom/client/src/interface_v3/group_compas.cpp @@ -74,7 +74,7 @@ void CCompassTarget::serial(NLMISC::IStream &f) // for the name, try to save a string identifier if possible, because language may be changed between // save & reload f.serial(Name); - std::string language = strlwr(ClientCfg.LanguageCode); + std::string language = toLower(ClientCfg.LanguageCode); f.serial(language); f.serialEnum(_Type); if (_Type == PosTracker) @@ -100,7 +100,7 @@ void CCompassTarget::serial(NLMISC::IStream &f) // reset the compass to north to avoid incoherency if (f.isReading()) { - if (strlwr(ClientCfg.LanguageCode) != language) + if (toLower(ClientCfg.LanguageCode) != language) { *this = CCompassTarget(); } diff --git a/code/ryzom/client/src/interface_v3/guild_manager.cpp b/code/ryzom/client/src/interface_v3/guild_manager.cpp index 2e0e4e3e7..a22c8dbc5 100644 --- a/code/ryzom/client/src/interface_v3/guild_manager.cpp +++ b/code/ryzom/client/src/interface_v3/guild_manager.cpp @@ -729,7 +729,7 @@ bool CDBGroupListAscensor::CSheetChildAscensor::isInvalidated(CDBGroupListSheetT { LIFT_ICONS::TLiftIcon li = (LIFT_ICONS::TLiftIcon)(icon & UINT64_CONSTANT(0x7FFFFFFFFFFFFFFF)); - string str = strlwr(LIFT_ICONS::toString(li)); + string str = toLower(LIFT_ICONS::toString(li)); Ctrl->setType(CCtrlSheetInfo::SheetType_Teleport_Location); Ctrl->setSlot("asc_"+str+".tga"); } diff --git a/code/ryzom/client/src/interface_v3/interface_3d_scene.cpp b/code/ryzom/client/src/interface_v3/interface_3d_scene.cpp index f17270143..19a6f4229 100644 --- a/code/ryzom/client/src/interface_v3/interface_3d_scene.cpp +++ b/code/ryzom/client/src/interface_v3/interface_3d_scene.cpp @@ -294,7 +294,7 @@ bool CInterface3DScene::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup) CXMLAutoPtr ptr((const char*)xmlGetProp (cur, (xmlChar*)"name")); string animName; if (ptr) - animName = strlwr (CFile::getFilenameWithoutExtension(ptr.str())); + animName = toLower(CFile::getFilenameWithoutExtension(ptr.str())); if (!animName.empty()) { @@ -1084,11 +1084,9 @@ bool CInterface3DIG::parse (xmlNodePtr cur, CInterface3DScene *parentGroup) ptr = xmlGetProp (cur, (xmlChar*)"rot"); if (ptr) _Rot = convertVector(ptr); - string name; ptr = xmlGetProp (cur, (xmlChar*)"name"); - if (ptr) name = (const char*)ptr; + if (ptr) _Name = toLower((const char*)ptr); - _Name = strlwr(name); _IG = UInstanceGroup::createInstanceGroup(_Name); if (_IG == NULL) return true; // Create anyway @@ -1202,7 +1200,7 @@ std::string CInterface3DIG::getName() const // ---------------------------------------------------------------------------- void CInterface3DIG::setName (const std::string &ht) { - string lwrname = strlwr(ht); + string lwrname = toLower(ht); if (lwrname != _Name) { CInterface3DScene *pI3DS = dynamic_cast(_Parent); @@ -1248,11 +1246,9 @@ bool CInterface3DShape::parse (xmlNodePtr cur, CInterface3DScene *parentGroup) ptr = xmlGetProp (cur, (xmlChar*)"rot"); if (ptr) _Rot = convertVector(ptr); - string name; ptr = xmlGetProp (cur, (xmlChar*)"name"); - if (ptr) name = (const char*)ptr; + if (ptr) _Name = toLower((const char*)ptr); - _Name = strlwr(name); _Instance = parentGroup->getScene()->createInstance(_Name); if (_Instance.empty()) return false; @@ -1529,11 +1525,8 @@ bool CInterface3DFX::parse (xmlNodePtr cur, CInterface3DScene *parentGroup) ptr = xmlGetProp (cur, (xmlChar*)"rot"); if (ptr) _Rot = convertVector(ptr); - string name; ptr = xmlGetProp (cur, (xmlChar*)"name"); - if (ptr) name = (const char*)ptr; - - _Name = strlwr(name); + if (ptr) _Name = toLower((const char*)ptr); return true; } diff --git a/code/ryzom/client/src/interface_v3/interface_manager.cpp b/code/ryzom/client/src/interface_v3/interface_manager.cpp index 0a3fe04a8..e97aa475e 100644 --- a/code/ryzom/client/src/interface_v3/interface_manager.cpp +++ b/code/ryzom/client/src/interface_v3/interface_manager.cpp @@ -2280,7 +2280,7 @@ void CInterfaceManager::displaySystemInfo(const ucstring &str, const string &cat CRGBA color = CRGBA::White; - map::const_iterator it = ClientCfg.SystemInfoParams.find(strlwr(cat)); + map::const_iterator it = ClientCfg.SystemInfoParams.find(toLower(cat)); if (it != ClientCfg.SystemInfoParams.end()) { mode = it->second.Mode; @@ -2315,7 +2315,7 @@ void CInterfaceManager::displaySystemInfo(const ucstring &str, const string &cat CRGBA CInterfaceManager::getSystemInfoColor(const std::string &cat) { CRGBA col = CRGBA::White; - map::const_iterator it = ClientCfg.SystemInfoParams.find(strlwr(cat)); + map::const_iterator it = ClientCfg.SystemInfoParams.find(toLower(cat)); if (it != ClientCfg.SystemInfoParams.end()) col = it->second.Color; return col; diff --git a/code/ryzom/client/src/interface_v3/inventory_manager.cpp b/code/ryzom/client/src/interface_v3/inventory_manager.cpp index 7a56e470e..f886bc3e9 100644 --- a/code/ryzom/client/src/interface_v3/inventory_manager.cpp +++ b/code/ryzom/client/src/interface_v3/inventory_manager.cpp @@ -3488,7 +3488,7 @@ CItemImage &CInventoryManager::getServerItem(uint inv, uint index) // *************************************************************************** CInventoryManager::TInvType CInventoryManager::invTypeFromString(const string &str) { - string sTmp = strlwr(str); + string sTmp = toLower(str); if (sTmp == "inv_bag") return InvBag; if (sTmp == "inv_pa0") return InvPA0; if (sTmp == "inv_pa1") return InvPA1; diff --git a/code/ryzom/client/src/interface_v3/music_player.cpp b/code/ryzom/client/src/interface_v3/music_player.cpp index c53dad13c..171fc328e 100644 --- a/code/ryzom/client/src/interface_v3/music_player.cpp +++ b/code/ryzom/client/src/interface_v3/music_player.cpp @@ -243,7 +243,7 @@ public: while (*bufferPtr) { // Concat the directory name with the filename - if (strlwr (CFile::getExtension(bufferPtr)) == "m3u") + if (toLower(CFile::getExtension(bufferPtr)) == "m3u") playlists.push_back (path+bufferPtr); else filenames.push_back (path+bufferPtr); diff --git a/code/ryzom/client/src/interface_v3/people_list.cpp b/code/ryzom/client/src/interface_v3/people_list.cpp index c2167358f..3433d1154 100644 --- a/code/ryzom/client/src/interface_v3/people_list.cpp +++ b/code/ryzom/client/src/interface_v3/people_list.cpp @@ -155,10 +155,10 @@ bool CPeopleList::create(const CPeopleListDesc &desc, const CChatWindowDesc *cha //================================================================== sint CPeopleList::getIndexFromName(const ucstring &name) const { - string sNameIn = strlwr(name.toString()); + string sNameIn = toLower(name.toString()); for(uint k = 0; k < _Peoples.size(); ++k) { - string sPeopleName = strlwr(_Peoples[k].getName().toString()); + string sPeopleName = toLower(_Peoples[k].getName().toString()); if (sPeopleName == sNameIn) return k; } return -1; diff --git a/code/ryzom/client/src/interface_v3/sbrick_manager.cpp b/code/ryzom/client/src/interface_v3/sbrick_manager.cpp index 036a50052..691f85e7d 100644 --- a/code/ryzom/client/src/interface_v3/sbrick_manager.cpp +++ b/code/ryzom/client/src/interface_v3/sbrick_manager.cpp @@ -404,8 +404,7 @@ void CSBrickManager::compileBrickProperties() string::size_type pos = prop.Text.find(':'); if (pos != string::npos) { - string key = prop.Text.substr(0, pos); - strlwr(key); + string key = toLower(prop.Text.substr(0, pos)); string value = prop.Text.substr(pos + 1); // get key id. if (_BrickPropIdMap.find(key) == _BrickPropIdMap.end()) @@ -506,7 +505,7 @@ void CSBrickManager::compileBrickProperties() // Parse all the brick properties if match the key float value= 0.f; // get the wanted prop id - strlwr(key); + key = toLower(key); uint propId= getBrickPropId(key); // if propid exist if(propId) diff --git a/code/ryzom/client/src/interface_v3/view_bitmap_faber_mp.cpp b/code/ryzom/client/src/interface_v3/view_bitmap_faber_mp.cpp index d59a89235..212ceebeb 100644 --- a/code/ryzom/client/src/interface_v3/view_bitmap_faber_mp.cpp +++ b/code/ryzom/client/src/interface_v3/view_bitmap_faber_mp.cpp @@ -59,8 +59,7 @@ bool CViewBitmapFaberMp::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup) prop = (char*) xmlGetProp( cur, (xmlChar*)"tx_noitem" ); if (prop) { - _TextureNoItemName = (const char *) prop; - _TextureNoItemName = strlwr (_TextureNoItemName); + _TextureNoItemName = toLower((const char *) prop); _TextureNoItemId = -2; } diff --git a/code/ryzom/client/src/interface_v3/view_radar.cpp b/code/ryzom/client/src/interface_v3/view_radar.cpp index 5ebb7fd64..073318ec8 100644 --- a/code/ryzom/client/src/interface_v3/view_radar.cpp +++ b/code/ryzom/client/src/interface_v3/view_radar.cpp @@ -95,8 +95,7 @@ bool CViewRadar::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup) prop = (char*) xmlGetProp( cur, (xmlChar*)spotTextureNames[i] ); if (prop) { - txName = (const char *) prop; - txName = strlwr (txName); + txName = toLower((const char *) prop); } _SpotDescriptions[i].TextureId.setTexture(txName.c_str()); rVR.getTextureSizeFromId (_SpotDescriptions[i].TextureId, _SpotDescriptions[i].TxW, _SpotDescriptions[i].TxH); @@ -105,8 +104,7 @@ bool CViewRadar::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup) prop = (char*) xmlGetProp( cur, (xmlChar*)spotMiniTextureNames[i] ); if (prop) { - txName = (const char *) prop; - txName = strlwr (txName); + txName = toLower((const char *) prop); } _SpotDescriptions[i].MiniTextureId.setTexture(txName.c_str()); rVR.getTextureSizeFromId (_SpotDescriptions[i].MiniTextureId, _SpotDescriptions[i].MTxW, _SpotDescriptions[i].MTxH); diff --git a/code/ryzom/client/src/mesh_camera_col_manager.cpp b/code/ryzom/client/src/mesh_camera_col_manager.cpp index 00cff5652..7a4452e38 100644 --- a/code/ryzom/client/src/mesh_camera_col_manager.cpp +++ b/code/ryzom/client/src/mesh_camera_col_manager.cpp @@ -108,7 +108,7 @@ void CMeshCameraColManager::instanceGroupAdded(NL3D::UInstanceGroup *ig) bool avoidCollisionInside= ig->dontCastShadowForInterior(i); bool avoidCollisionOutside= ig->dontCastShadowForExterior(i); // very special patch for the matis serre (grrrrrrrrrrrrr) - avoidCollisionOutside= avoidCollisionOutside || strlwr(shapeName)== "ma_serre_interieur.shape"; + avoidCollisionOutside= avoidCollisionOutside || toLower(shapeName)== "ma_serre_interieur.shape"; // then send the result to the collision manager, and keep the mesh col id if succeed uint32 meshId= CollisionManager->addMeshInstanceCollision(colMesh, mat, avoidCollisionInside, avoidCollisionOutside); diff --git a/code/ryzom/client/src/net_manager.cpp b/code/ryzom/client/src/net_manager.cpp index b238dbd55..ead456a81 100644 --- a/code/ryzom/client/src/net_manager.cpp +++ b/code/ryzom/client/src/net_manager.cpp @@ -692,7 +692,7 @@ void CInterfaceChatDisplayer::displayChat(TDataSetIndex compressedSenderIndex, c if (!stringCategory.empty() && stringCategory != "SYS") { map::const_iterator it; - it = ClientCfg.SystemInfoParams.find(strlwr(stringCategory)); + it = ClientCfg.SystemInfoParams.find(toLower(stringCategory)); if (it != ClientCfg.SystemInfoParams.end()) { col = it->second.Color; @@ -723,7 +723,7 @@ void CInterfaceChatDisplayer::displayChat(TDataSetIndex compressedSenderIndex, c if( !stringCategory.empty() ) { map::const_iterator it; - it = ClientCfg.SystemInfoParams.find( strlwr(stringCategory) ); + it = ClientCfg.SystemInfoParams.find( toLower(stringCategory) ); if( it != ClientCfg.SystemInfoParams.end() ) { if( !(*it).second.SysInfoFxName.empty() ) diff --git a/code/ryzom/client/src/outpost.cpp b/code/ryzom/client/src/outpost.cpp index 4968b8968..b345d36cb 100644 --- a/code/ryzom/client/src/outpost.cpp +++ b/code/ryzom/client/src/outpost.cpp @@ -99,7 +99,7 @@ void COutpost::initOutpost () for (i=0; i::const_iterator igIt = IGLoaded.find(strlwr(strPos)); + std::map::const_iterator igIt = IGLoaded.find(toLower(strPos)); if (igIt != IGLoaded.end()) { return igIt->second; @@ -188,7 +188,7 @@ void releaseLandscapeIGCallbacks() void addPacsPrim(const std::string &fileName) { - std::string ppName = NLMISC::strlwr(NLMISC::CFile::getFilenameWithoutExtension(fileName)); + std::string ppName = NLMISC::toLower(NLMISC::CFile::getFilenameWithoutExtension(fileName)); if (PacsPrims.find(ppName) != PacsPrims.end()) { nlwarning(("Pacs primitive " + ppName + " already has been inserted").c_str()); diff --git a/code/ryzom/client/src/sky.cpp b/code/ryzom/client/src/sky.cpp index 855ab3387..5d66c2d70 100644 --- a/code/ryzom/client/src/sky.cpp +++ b/code/ryzom/client/src/sky.cpp @@ -281,7 +281,7 @@ CBitmap *buildSharedBitmap(const std::string &filename, { alreadyBuilt = false; if (filename.empty()) return NULL; - std::string lcBMFilename = strlwr(CFile::getFilenameWithoutExtension(filename)); + std::string lcBMFilename = toLower(CFile::getFilenameWithoutExtension(filename)); std::map::iterator it = bitmapByName.find(lcBMFilename); if (it != bitmapByName.end()) { diff --git a/code/ryzom/client/src/streamable_ig.cpp b/code/ryzom/client/src/streamable_ig.cpp index f73df6126..e93b62c4c 100644 --- a/code/ryzom/client/src/streamable_ig.cpp +++ b/code/ryzom/client/src/streamable_ig.cpp @@ -291,10 +291,8 @@ bool CStreamableIG::setIG(uint ig, const std::string &name, const std::string &p } // Load this IG - _IGs[ig].Name = NLMISC::CFile::getFilenameWithoutExtension(name); - _IGs[ig].ParentName = NLMISC::CFile::getFilenameWithoutExtension(parentName); - NLMISC::strlwr(_IGs[ig].Name); - NLMISC::strlwr(_IGs[ig].ParentName); + _IGs[ig].Name = NLMISC::toLower(NLMISC::CFile::getFilenameWithoutExtension(name)); + _IGs[ig].ParentName = NLMISC::toLower(NLMISC::CFile::getFilenameWithoutExtension(parentName)); _IGs[ig].IG = NULL; _IGs[ig].Loading = false; _Linked = false; @@ -308,10 +306,8 @@ void CStreamableIG::addIG(const std::string &name,const std::string &parentName, { H_AUTO_USE(RZ_StremableIG) _IGs.push_back(CIGNode ()); - _IGs.back().Name = NLMISC::CFile::getFilenameWithoutExtension(name); - _IGs.back().ParentName = NLMISC::CFile::getFilenameWithoutExtension(parentName); - NLMISC::strlwr(_IGs.back().Name); - NLMISC::strlwr(_IGs.back().ParentName); + _IGs.back().Name = NLMISC::toLower(NLMISC::CFile::getFilenameWithoutExtension(name)); + _IGs.back().ParentName = NLMISC::toLower(NLMISC::CFile::getFilenameWithoutExtension(parentName)); _IGs.back().IG = NULL; _IGs.back().Loading = false; _IGs.back().Pos = pos; @@ -376,7 +372,7 @@ void CStreamableIG::addLoadedIGToMap() if (_IGs[k].IG && _IGs[k].IG != (NL3D::UInstanceGroup *)-1) // is this a successfully loaded ig ? { // insert the new ig if it hasn't before.. - if( _IGMap->insert(std::make_pair(NLMISC::strlwr(_IGs[k].Name), _IGs[k].IG)).second ) + if( _IGMap->insert(std::make_pair(NLMISC::toLower(_IGs[k].Name), _IGs[k].IG)).second ) // if inserted, must notify IG Added, else already notifiyed by loadAsync() this->notifyIGAdded(_IGs[k].IG); } diff --git a/code/ryzom/client/src/string_manager_client.cpp b/code/ryzom/client/src/string_manager_client.cpp index 71ca87ad8..da2fef260 100644 --- a/code/ryzom/client/src/string_manager_client.cpp +++ b/code/ryzom/client/src/string_manager_client.cpp @@ -1413,8 +1413,7 @@ const ucchar * CStringManagerClient::getSpecialWord(const std::string &label, bo // avoid case problems static std::string lwrLabel; - lwrLabel = label; - strlwr(lwrLabel); + lwrLabel = toLower(label); if (_SpecItem_MemoryCompressed) { @@ -1464,8 +1463,7 @@ const ucchar * CStringManagerClient::getSpecialDesc(const std::string &label) // avoid case problems static std::string lwrLabel; - lwrLabel= label; - strlwr(lwrLabel); + lwrLabel = toLower(label); if (_SpecItem_MemoryCompressed) { @@ -1498,8 +1496,7 @@ const ucchar * CStringManagerClient::getSpecialDesc2(const std::string &label) // avoid case problems static std::string lwrLabel; - lwrLabel= label; - strlwr(lwrLabel); + lwrLabel = toLower(label); if (_SpecItem_MemoryCompressed) { @@ -1703,8 +1700,7 @@ void CStringManagerClient::replaceSBrickName(NLMISC::CSheetId id, const ucstring // avoid case problems static std::string lwrLabel; - lwrLabel= label; - strlwr(lwrLabel); + lwrLabel = toLower(label); if (_SpecItem_MemoryCompressed) { diff --git a/code/ryzom/common/src/game_share/fame.cpp b/code/ryzom/common/src/game_share/fame.cpp index ca226ecdc..51f80114e 100644 --- a/code/ryzom/common/src/game_share/fame.cpp +++ b/code/ryzom/common/src/game_share/fame.cpp @@ -359,8 +359,7 @@ void CStaticFames::loadStaticFame( const string& filename ) // 1st, build the index table for (uint i=1; i &sh { if (sheets[k]) { - std::string id = NLMISC::strlwr(NLMISC::CFile::getFilenameWithoutExtension(sheetNames[k])); + std::string id = NLMISC::toLower(NLMISC::CFile::getFilenameWithoutExtension(sheetNames[k])); CWeatherSetup *ws = newWeatherSetup(); if (ws) { @@ -70,7 +70,7 @@ void CWeatherManager::release() //================================================================================================ const CWeatherSetup *CWeatherManager::getSetup(const char *name) const { - std::string id = NLMISC::strlwr(CFile::getFilenameWithoutExtension(name)); + std::string id = NLMISC::toLower(CFile::getFilenameWithoutExtension(name)); TWeatherSetupMap::const_iterator it = _WeatherSetupMap.find(id); if (it == _WeatherSetupMap.end()) return NULL; return it->second; diff --git a/code/ryzom/common/src/game_share/time_weather_season/weather_setup_sheet_base.cpp b/code/ryzom/common/src/game_share/time_weather_season/weather_setup_sheet_base.cpp index 6d868741d..345b0e4a2 100644 --- a/code/ryzom/common/src/game_share/time_weather_season/weather_setup_sheet_base.cpp +++ b/code/ryzom/common/src/game_share/time_weather_season/weather_setup_sheet_base.cpp @@ -85,7 +85,7 @@ void CWeatherStateSheet::build(const NLGEORGES::UFormElm &item) GetWeatherFormValue(item, fxName, "FXName"); if (!fxName.empty()) { - fxName = NLMISC::strlwr(NLMISC::CFile::getFilenameWithoutExtension(fxName)); + fxName = NLMISC::toLower(NLMISC::CFile::getFilenameWithoutExtension(fxName)); if (!fxName.empty()) { FXInfos.resize(1); @@ -192,7 +192,7 @@ void CWeatherSetupSheetBase::build(const NLGEORGES::UFormElm &item) CloudState.build(item); std::string setupName; GetWeatherFormValue(item, setupName, "SetupName"); - SetupName = NLMISC::CStringMapper::map(NLMISC::strlwr(setupName)); + SetupName = NLMISC::CStringMapper::map(NLMISC::toLower(setupName)); } //================================================================================== @@ -203,7 +203,7 @@ void CWeatherSetupSheetBase::serial(class NLMISC::IStream &f) throw(NLMISC::EStr { std::string setupName; f.serial(setupName); - SetupName = NLMISC::CStringMapper::map(NLMISC::strlwr(setupName)); + SetupName = NLMISC::CStringMapper::map(NLMISC::toLower(setupName)); } else {