Fixed: Switch not handled warnings

This commit is contained in:
kervala 2014-03-27 15:53:19 +01:00
parent 9455917025
commit 85ab0dba81
9 changed files with 71 additions and 51 deletions

View file

@ -70,13 +70,16 @@ CPixelProgamDrvInfosGL::CPixelProgamDrvInfosGL (CDriverGL *drv, ItGPUPrgDrvInfoP
bool CDriverGL::supportPixelProgram(CPixelProgram::TProfile profile) const
{
H_AUTO_OGL(CPixelProgamDrvInfosGL_supportPixelProgram_profile)
H_AUTO_OGL(CPixelProgamDrvInfosGL_supportPixelProgram_profile);
switch (profile)
{
case CPixelProgram::arbfp1:
return _Extensions.ARBFragmentProgram;
case CPixelProgram::fp40:
return _Extensions.NVFragmentProgram2;
default:
break;
}
return false;
}

View file

@ -60,6 +60,8 @@ inline void CDriverGL::setUniform4fInl(TProgram program, uint index, float f0, f
nglProgramEnvParameter4fARB(GL_FRAGMENT_PROGRAM_ARB, index, f0, f1, f2, f3);
}
break;
default:
break;
}
#endif
}
@ -100,6 +102,8 @@ inline void CDriverGL::setUniform4fvInl(TProgram program, uint index, size_t num
}
}
break;
default:
break;
}
#endif
}

View file

@ -78,6 +78,9 @@ namespace NLGUI
case TTSpecialWindow:
return "special";
break;
default:
break;
}
return "";

View file

@ -801,7 +801,10 @@ namespace NLGUI
return "radio_button";
break;
default:
break;
}
return "";
}

View file

@ -208,6 +208,9 @@ namespace NLGUI
case PlayerName:
return "playername";
break;
default:
break;
}
return "text";
@ -497,6 +500,9 @@ namespace NLGUI
case PlayerName:
e = "playername";
break;
default:
break;
}
xmlSetProp( node, BAD_CAST "enter_type", BAD_CAST e.c_str() );

View file

@ -199,78 +199,78 @@ namespace NLGUI
{
return toString( _MaxElements );
}
else
if( name == "addelt" )
{
switch( _AddElt )
{
case Top:
return "T";
break;
case Left:
return "L";
break;
case Right:
return "R";
break;
case Bottom:
return "B";
}
return "B";
nlassert(false);
}
else
if( name == "align" )
{
switch( _Align )
{
case Top:
return "T";
break;
case Left:
return "L";
break;
case Right:
return "R";
break;
case Bottom:
return "B";
}
return "B";
nlassert(false);
}
else
if( name == "space" )
{
return toString( _Space );
}
else
if( name == "over" )
{
return toString( _Over );
}
else
if( name == "dynamic_display_size" )
{
return toString( _DynamicDisplaySize );
}
else
if( name == "col_over" )
{
return toString( _OverColor );
}
else
if( name == "hardtext" )
{
return _HardText;
}
else
if( name == "textid" )
{
return toString( _TextId );
}
else
return CInterfaceGroup::getProperty( name );
return CInterfaceGroup::getProperty( name );
}
void CGroupList::setProperty( const std::string &name, const std::string &value )
@ -282,7 +282,7 @@ namespace NLGUI
_MaxElements = i;
return;
}
else
if( name == "addelt" )
{
if( value == "T" )
@ -300,7 +300,7 @@ namespace NLGUI
setupSizes();
return;
}
else
if( name == "align" )
{
if( value == "T" )
@ -317,7 +317,7 @@ namespace NLGUI
return;
}
else
if( name == "space" )
{
sint32 i;
@ -325,7 +325,7 @@ namespace NLGUI
_Space = i;
return;
}
else
if( name == "over" )
{
bool b;
@ -333,7 +333,7 @@ namespace NLGUI
_Over = b;
return;
}
else
if( name == "dynamic_display_size" )
{
bool b;
@ -341,7 +341,7 @@ namespace NLGUI
_DynamicDisplaySize = b;
return;
}
else
if( name == "col_over" )
{
CRGBA c;
@ -349,7 +349,7 @@ namespace NLGUI
_OverColor = c;
return;
}
else
if( name == "hardtext" )
{
_HardText = value;
@ -357,7 +357,7 @@ namespace NLGUI
onTextChanged();
return;
}
else
if( name == "textid" )
{
uint32 i;
@ -367,8 +367,8 @@ namespace NLGUI
onTextChanged();
return;
}
else
CInterfaceGroup::setProperty( name, value );
CInterfaceGroup::setProperty( name, value );
}

View file

@ -197,18 +197,18 @@ namespace NLGUI
{
case Top:
return "T";
break;
case Left:
return "L";
break;
case Right:
return "R";
break;
case Bottom:
return "B";
}
return "B";
nlassert(false);
}
else
if( name == "align" )
@ -217,18 +217,18 @@ namespace NLGUI
{
case Top:
return "T";
break;
case Left:
return "L";
break;
case Right:
return "R";
break;
case Bottom:
return "B";
}
return "B";
nlassert(false);
}
else
if( name == "space" )

View file

@ -80,15 +80,15 @@ namespace NLGUI
{
case Right:
return "right";
break;
case Center:
return "center";
break;
case Left:
return "left";
}
return "left";
nlassert(false);
}
else
if( name == "valign" )
@ -97,14 +97,15 @@ namespace NLGUI
{
case Middle:
return "middle";
break;
case Bottom:
return "bottom";
break;
case Top:
return "top";
}
return "top";
nlassert(false);
}
else
if( name == "left_margin" )

View file

@ -2292,23 +2292,23 @@ void CCharacterCL::endAnimTransition()
if(_CurrentState->NextMode != _Mode)
{
// Undo previous behaviour
switch(_Mode)
if (_Mode == MBEHAV::DEATH)
{
case MBEHAV::DEATH:
// Restore collisions.
if(_Primitive)
if (_Primitive)
{
// TODO: Without this dynamic cast
if(dynamic_cast<CPlayerCL *>(this))
if (dynamic_cast<CPlayerCL *>(this))
_Primitive->setOcclusionMask(MaskColPlayer);
else
_Primitive->setOcclusionMask(MaskColNpc);
}
break;
}
if(ClientCfg.UsePACSForAll && _Primitive)
if (ClientCfg.UsePACSForAll && _Primitive)
_Primitive->setCollisionMask(MaskColNone);
//// AJOUT ////
//// ADDED ////
switch(_CurrentState->NextMode)
{
// Combat