From 4e4f19f809f013c880207969ce5a8ec9d8d91a85 Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 9 Jan 2016 16:07:38 +0100 Subject: [PATCH] Changed: Replace strlwr by toLower --HG-- branch : develop --- code/ryzom/client/src/3d_notes.cpp | 4 ++-- code/ryzom/client/src/animation_fx_sheet.cpp | 3 +-- .../client_sheets/automaton_list_sheet.cpp | 6 +++--- .../src/client_sheets/character_sheet.cpp | 6 +++--- .../client/src/client_sheets/item_sheet.cpp | 20 +++++++++---------- .../client_sheets/outpost_building_sheet.cpp | 8 ++++---- .../client/src/client_sheets/player_sheet.cpp | 4 ++-- .../client/src/client_sheets/sbrick_sheet.cpp | 11 +++++----- code/ryzom/client/src/commands.cpp | 4 ++-- .../src/interface_v3/sphrase_manager.cpp | 2 +- code/ryzom/client/src/teleport.cpp | 6 ++---- 11 files changed, 35 insertions(+), 39 deletions(-) diff --git a/code/ryzom/client/src/3d_notes.cpp b/code/ryzom/client/src/3d_notes.cpp index 618525de4..c53ac7ef1 100644 --- a/code/ryzom/client/src/3d_notes.cpp +++ b/code/ryzom/client/src/3d_notes.cpp @@ -280,11 +280,11 @@ NLMISC_COMMAND(gotoNote, "go to a note", "|") if(i != 0) tok += " "; tok += args[i]; } - tok = strlwr(tok); + tok = toLower(tok); list::iterator it; for(it = Notes.Notes.begin(); it != Notes.Notes.end(); it++) { - string note = strlwr((*it).Note); + string note = toLower((*it).Note); if(note.find(tok) != string::npos) { pos = (*it).Position; diff --git a/code/ryzom/client/src/animation_fx_sheet.cpp b/code/ryzom/client/src/animation_fx_sheet.cpp index 99175ad71..b5c778b11 100644 --- a/code/ryzom/client/src/animation_fx_sheet.cpp +++ b/code/ryzom/client/src/animation_fx_sheet.cpp @@ -64,8 +64,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/client_sheets/automaton_list_sheet.cpp b/code/ryzom/client/src/client_sheets/automaton_list_sheet.cpp index fe7cd002c..1f0b6565c 100644 --- a/code/ryzom/client/src/client_sheets/automaton_list_sheet.cpp +++ b/code/ryzom/client/src/client_sheets/automaton_list_sheet.cpp @@ -204,7 +204,7 @@ void CAutomatonStateSheet::build(const NLGEORGES::UFormElm &item, const string & for(uint mode = 0; mode ") if (args.size() == 0) return false; - if (!ClientCfg.AllowDebugLua && strlwr(args[0]) == "lua") + if (!ClientCfg.AllowDebugLua && toLower(args[0]) == "lua") { return false; // not allowed!! } @@ -1883,7 +1883,7 @@ NLMISC_COMMAND(pos, "Change the position of the user (in local only)", "getValueByName(destName, "name")) { - // All in UPPER CASE to not be CASE SENSITIVE. - NLMISC::strlwr(destName); - // Get the position CVector pos; if(tpElmt->getValueByName(pos.x, "position.X") && tpElmt->getValueByName(pos.y, "position.Y") && tpElmt->getValueByName(pos.z, "position.Z")) { - _Destinations.insert(make_pair(destName, pos)); + // All in UPPER CASE to not be CASE SENSITIVE. + _Destinations.insert(make_pair(NLMISC::toLower(destName), pos)); } else nlwarning("CTeleport::load: Cannot find the one of the key 'position.X or Y or Z' for the element %d.", i);