From 4bbd1a8ec640b9ed534abcbb9f510f986baeb4e8 Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 20 Dec 2015 11:18:53 +0100 Subject: [PATCH] Changed: Simplified code --- code/ryzom/client/src/player_cl.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/code/ryzom/client/src/player_cl.cpp b/code/ryzom/client/src/player_cl.cpp index 8ecaaaaef..97e378c2b 100644 --- a/code/ryzom/client/src/player_cl.cpp +++ b/code/ryzom/client/src/player_cl.cpp @@ -634,12 +634,10 @@ void CPlayerCL::equip(SLOTTYPE::EVisualSlot slot, uint index, uint color) { if(SheetMngr.getItem(slot, (uint)idx)) { - // If the gender is a female get the right shape. - if(_Gender == GSGENDER::female) - equip(slot, SheetMngr.getItem(slot, (uint)idx)->getShapeFemale()); - // Else get the default shape. - else - equip(slot, SheetMngr.getItem(slot, (uint)idx)->getShape()); + const CItemSheet *itemSheet = SheetMngr.getItem(slot, (uint)idx); + + // If the gender is a female get the right shape else get the default shape. + equip(slot, _Gender == GSGENDER::female ? itemSheet->getShapeFemale():itemSheet->getShape()); } } }