Fixed: Warning with clang

This commit is contained in:
kervala 2013-11-13 21:40:41 +01:00
parent 8099217145
commit d8a6c9f966
8 changed files with 9 additions and 21 deletions

View file

@ -488,9 +488,9 @@ void CDriverGL::setUniformParams(TProgram program, CGPUProgramParams &params)
if (index == ~0)
{
const std::string &name = params.getNameByOffset(offset);
nlassert(!name.empty() /* missing both parameter name and index, code error /);
nlassert(!name.empty()); // missing both parameter name and index, code error
uint index = prog->getUniformIndex(name.c_str());
nlassert(index != ~0 /* invalid parameter name /);
nlassert(index != ~0); // invalid parameter name
params.map(index, name);
}

View file

@ -876,38 +876,32 @@ namespace NLGUI
{
case Hotspot_TL:
return "TL";
break;
case Hotspot_TM:
return "TM";
break;
case Hotspot_TR:
return "TR";
break;
case Hotspot_ML:
return "ML";
break;
case Hotspot_MM:
return "MM";
break;
case Hotspot_MR:
return "MR";
break;
case Hotspot_BL:
return "BL";
break;
case Hotspot_BM:
return "BM";
break;
case Hotspot_BR:
return "BR";
default:
break;
}

View file

@ -517,13 +517,6 @@ void CBufServer::receive( CMemStream& buffer, TSockId* phostid )
*phostid = *((TSockId*)&(buffer.buffer()[buffer.size()-sizeof(TSockId)-1]));
nlassert( buffer.buffer()[buffer.size()-1] == CBufNetBase::User );
// debug features, we number all packet to be sure that they are all sent and received
// \todo remove this debug feature when ok
#ifdef NL_BIG_ENDIAN
uint32 val = NLMISC_BSWAP32(*(uint32*)buffer.buffer());
#else
uint32 val = *(uint32*)buffer.buffer();
#endif
buffer.resize( buffer.size()-sizeof(TSockId)-1 );
// TODO OPTIM remove the nldebug for speed

View file

@ -564,7 +564,7 @@ CCharacter3D::CCharacter3D()
_CurrentSetup.ArmsWidth = _CurrentSetup.LegsWidth = _CurrentSetup.BreastSize = -20.0f;
_PelvisPos.set(0.f,0.f,-20.0f);
_CurPosX = _CurPosY = _CurPosZ = 0.0f;
_CurRotX, _CurRotY, _CurRotZ = 0.0f;
_CurRotX = _CurRotY = _CurRotZ = 0.0f;
_NextBlinkTime = 0;
_CopyAnim=false;
}

View file

@ -163,7 +163,7 @@ void CGroupQuickHelp::setGroupTextSize (CInterfaceGroup *group, bool selected)
{
bool globalColor = selected ? TextColorGlobalColor : _NonSelectedGlobalColor;
bool linkGlobalColor = selected ? LinkColorGlobalColor : _NonSelectedGlobalColor;
uint fontSize = selected ? TextFontSize : _NonSelectedSize;_NonSelectedSize;
uint fontSize = selected ? TextFontSize : _NonSelectedSize;
NLMISC::CRGBA color = selected ? TextColor : _NonSelectedColor;
NLMISC::CRGBA linkColor = selected ? LinkColor : _NonSelectedLinkColor;

View file

@ -997,7 +997,6 @@ bool mainLoop()
// Init GameContextMenu.
GameContextMenu;
GameContextMenu.init("");
// Active inputs

View file

@ -1100,7 +1100,7 @@ void CTimedFXManager::setMaxNumFXInstances(uint maxNumInstances)
FPU_CHECKER
H_AUTO_USE(RZ_TimedFX)
_MaxNumberOfFXInstances = maxNumInstances;
_CandidateFXListTouched;
_CandidateFXListTouched = true;
}
// *******************************************************************************************

View file

@ -158,6 +158,8 @@ public:
case FLOAT :
fromString((*itt).second, value);
break;
default:
break;
}
}