Fixed: Warning with clang

This commit is contained in:
kervala 2013-11-13 21:40:41 +01:00
parent 2109b536d0
commit b7feea6c95
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) if (index == ~0)
{ {
const std::string &name = params.getNameByOffset(offset); 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()); uint index = prog->getUniformIndex(name.c_str());
nlassert(index != ~0 /* invalid parameter name /); nlassert(index != ~0); // invalid parameter name
params.map(index, name); params.map(index, name);
} }

View file

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

View file

@ -517,13 +517,6 @@ void CBufServer::receive( CMemStream& buffer, TSockId* phostid )
*phostid = *((TSockId*)&(buffer.buffer()[buffer.size()-sizeof(TSockId)-1])); *phostid = *((TSockId*)&(buffer.buffer()[buffer.size()-sizeof(TSockId)-1]));
nlassert( buffer.buffer()[buffer.size()-1] == CBufNetBase::User ); 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 ); buffer.resize( buffer.size()-sizeof(TSockId)-1 );
// TODO OPTIM remove the nldebug for speed // TODO OPTIM remove the nldebug for speed

View file

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

View file

@ -163,7 +163,7 @@ void CGroupQuickHelp::setGroupTextSize (CInterfaceGroup *group, bool selected)
{ {
bool globalColor = selected ? TextColorGlobalColor : _NonSelectedGlobalColor; bool globalColor = selected ? TextColorGlobalColor : _NonSelectedGlobalColor;
bool linkGlobalColor = selected ? LinkColorGlobalColor : _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 color = selected ? TextColor : _NonSelectedColor;
NLMISC::CRGBA linkColor = selected ? LinkColor : _NonSelectedLinkColor; NLMISC::CRGBA linkColor = selected ? LinkColor : _NonSelectedLinkColor;

View file

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

View file

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

View file

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