Changed: NLMISC::strupr is depreciated (use NLMISC::toUpper instead

This commit is contained in:
kervala 2010-07-15 19:58:04 +02:00
parent b4aaac574f
commit aa88a7fb49
6 changed files with 10 additions and 15 deletions

View file

@ -239,7 +239,7 @@ void CItemSheet::build(const NLGEORGES::UFormElm &item)
debug(toString("The slot name %d is Empty.", i));
// Push the possible slots for the item in the list.
SlotBF|= SINT64_CONSTANT(1)<< (SLOTTYPE::stringToSlotType(NLMISC::strupr(slotName)));
SlotBF|= SINT64_CONSTANT(1)<< (SLOTTYPE::stringToSlotType(NLMISC::toUpper(slotName)));
}
}
}
@ -258,7 +258,7 @@ void CItemSheet::build(const NLGEORGES::UFormElm &item)
}
else
{
Family = (ITEMFAMILY::EItemFamily) ITEMFAMILY::stringToItemFamily(NLMISC::strupr( family) );
Family = (ITEMFAMILY::EItemFamily) ITEMFAMILY::stringToItemFamily(NLMISC::toUpper( family) );
if(Family == ITEMFAMILY::UNDEFINED)
debug("Item Family Undefined.");
}
@ -272,7 +272,7 @@ void CItemSheet::build(const NLGEORGES::UFormElm &item)
}
else
{
ItemType = (ITEM_TYPE::TItemType) ITEM_TYPE::stringToItemType(NLMISC::strupr(itemtype) );
ItemType = (ITEM_TYPE::TItemType) ITEM_TYPE::stringToItemType(NLMISC::toUpper(itemtype) );
if (ItemType == ITEM_TYPE::UNDEFINED)
debug("Item Type Undefined.");
}

View file

@ -103,7 +103,7 @@ void CSBrickSheet::build (const NLGEORGES::UFormElm &root)
{
string sheetName= Id.toString();
std::string::size_type end= sheetName.find(".sbrick")-2;
BrickFamily = BRICK_FAMILIES::toSBrickFamily ( strupr(sheetName.substr(0,end)) );
BrickFamily = BRICK_FAMILIES::toSBrickFamily ( NLMISC::toUpper(sheetName.substr(0,end)) );
if(BrickFamily==BRICK_FAMILIES::Unknown)
nlwarning("Unknown Family for SBrick: %s", sheetName.c_str());
}

View file

@ -266,7 +266,7 @@ bool CColorSlotManager::parseTexName(const char *texName, std::string *texNameWi
static std::string nameToParse;
static std::string currentExt;
static TIntCoupleVect slotsId;
nameToParse = NLMISC::strupr(NLMISC::CFile::getFilenameWithoutExtension(texName));
nameToParse = NLMISC::toUpper(NLMISC::CFile::getFilenameWithoutExtension(texName));
TStrPos currPos = nameToParse.length();
@ -377,9 +377,8 @@ bool CColorSlotManager::changeTexName(std::string &texName, TIntCouple *slotIDs,
static TIntCoupleVect srcSlotIDs;
everythingOk = true;
texNameNoExt = NLMISC::CFile::getFilenameWithoutExtension(texName);
texNameNoExt = NLMISC::toUpper(NLMISC::CFile::getFilenameWithoutExtension(texName));
texExt = NLMISC::CFile::getExtension(texName);
NLMISC::strupr(texNameNoExt);
TTex2Slots::const_iterator texIt = _TexMap.find(texNameNoExt);
if (texIt != _TexMap.end())
{

View file

@ -105,8 +105,7 @@ void CActionPhraseFaber::launchFaberCastWindow(sint32 memoryLine, uint memoryIn
_FaberPlanBrickFamilies.clear();
if(rootBrick->Properties.size()>0)
{
string prop= rootBrick->Properties[0].Text;
strupr(prop);
string prop= NLMISC::toUpper(rootBrick->Properties[0].Text);
vector<string> strList;
splitString(prop, " ", strList);
// The prop Id should be 'FPLAN:'

View file

@ -378,9 +378,8 @@ bool CCtrlSheetInfo::parseCtrlInfo(xmlNodePtr cur, CInterfaceGroup * /* parentGr
// The string may have multiple brick type separated by |
string brickTypeArray= (const char*)prop;
strupr(brickTypeArray);
vector<string> strList;
NLMISC::splitString(brickTypeArray, "|", strList);
NLMISC::splitString(NLMISC::toUpper(brickTypeArray), "|", strList);
// Test All words
for(uint i=0;i<strList.size();i++)
@ -406,8 +405,7 @@ bool CCtrlSheetInfo::parseCtrlInfo(xmlNodePtr cur, CInterfaceGroup * /* parentGr
if(prop)
{
string str= prop;
strupr(str);
_ItemSlot= SLOTTYPE::stringToSlotType(str);
_ItemSlot= SLOTTYPE::stringToSlotType(NLMISC::toUpper(str));
}
// _AutoGrayed

View file

@ -396,10 +396,9 @@ CModalContainerEditCmd::CModalContainerEditCmd()
void CModalContainerEditCmd::create(const std::string &name, bool bDefKey, bool allowAllActions)
{
CInterfaceManager *pIM = CInterfaceManager::getInstance();
string prefix = name;
string prefix = NLMISC::toUpper(name);
CanDefineKey = bDefKey;
_AllowAllActions = allowAllActions;
prefix = strupr(prefix);
prefix = string(DB_EDITCMD_PREFIX) + string(":") + prefix + string(":");
DbComboSelCat = prefix + DB_EDITCMD_COMBO_SELECT_CATEGORY;
DbComboSelAct = prefix + DB_EDITCMD_COMBO_SELECT_ACTION;