From cbf407f9a1330d8207574ee696e9a75d7533f9ed Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 18 Dec 2016 14:40:54 +0100 Subject: [PATCH] Changed: Replaced comparisons with string("") by empty() check --HG-- branch : develop --- .../egs_sheets/egs_static_game_sheet.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_sheet.cpp b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_sheet.cpp index 2d9b15e37..a88ae94eb 100644 --- a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_sheet.cpp +++ b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_sheet.cpp @@ -688,7 +688,7 @@ void CStaticCreatures::readGeorges( const NLMISC::CSmartPtr &f for( i = 0; i < SLOT_EQUIPMENT::NB_SLOT_EQUIPMENT; ++i ) { root.getValueByName( sheetName, (string("Basics.Equipment.") + SLOT_EQUIPMENT::toString( (SLOT_EQUIPMENT::TSlotEquipment) i ) + string(".Item" )).c_str() ); - if( sheetName != string("") && sheetName.find(".item") != std::string::npos ) + if( !sheetName.empty() && sheetName.find(".item") != std::string::npos ) { sheet = CSheetId( sheetName ); _Items[ i ].IdSheet = sheet.asInt(); @@ -1790,7 +1790,7 @@ void CStaticCharacters::readGeorges( const NLMISC::CSmartPtr & /* for( i = 0; i < NB_SHEATH; ++i ) { root.getValueByName( sheetName, "Basics.Equipment.Sheath" + toString( i ) + "LeftHand.Item" ); - if( sheetName != string("") ) + if( !sheetName.empty() ) { sheet = CSheetId( sheetName ); Sheaths[ i ].Left.IdSheet = sheet.asInt(); @@ -1803,7 +1803,7 @@ void CStaticCharacters::readGeorges( const NLMISC::CSmartPtr & } root.getValueByName( sheetName, "Basics.Equipment.Sheath" + toString( i ) + "RightHand.Item" ); - if( sheetName != string("") ) + if( !sheetName.empty() ) { sheet = CSheetId( sheetName ); Sheaths[ i ].Right.IdSheet = sheet.asInt(); @@ -1816,7 +1816,7 @@ void CStaticCharacters::readGeorges( const NLMISC::CSmartPtr & } root.getValueByName( sheetName, "Basics.Equipment.Sheath" + toString( i ) + "Ammo0.Item" ); - if( sheetName != string("") ) + if( !sheetName.empty() ) { sheet = CSheetId( sheetName ); Sheaths[ i ].Ammo0.IdSheet = sheet.asInt(); @@ -1829,7 +1829,7 @@ void CStaticCharacters::readGeorges( const NLMISC::CSmartPtr & } root.getValueByName( sheetName, "Basics.Equipment.Sheath" + toString( i ) + "Ammo1.Item" ); - if( sheetName != string("") ) + if( !sheetName.empty() ) { sheet = CSheetId( sheetName ); Sheaths[ i ].Ammo1.IdSheet = sheet.asInt(); @@ -1842,7 +1842,7 @@ void CStaticCharacters::readGeorges( const NLMISC::CSmartPtr & } root.getValueByName( sheetName, "Basics.Equipment.Sheath" + toString( i ) + "Ammo2.Item" ); - if( sheetName != string("") ) + if( !sheetName.empty() ) { sheet = CSheetId( sheetName ); Sheaths[ i ].Ammo2.IdSheet = sheet.asInt();