1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2024-12-23 01:59:43 +08:00

Fixed a clang warning: control may reach end of non-void function [-Wreturn-type] (bug 4877, r=dvander).

This commit is contained in:
Scott Ehlert 2011-04-23 21:29:46 -05:00
parent 435505b6dd
commit d529bf38f5

View File

@ -1213,20 +1213,26 @@ FORCEINLINE float CBitRead::ReadFloat( void )
#endif
FORCEINLINE unsigned int CBitRead::ReadUBitVar( void )
{
switch( ReadUBitLong( 2 ) )
unsigned int ret = ReadUBitLong( 2 );
switch( ret )
{
case 0:
return ReadUBitLong( 4 );
ret = ReadUBitLong( 4 );
break;
case 1:
return ReadUBitLong( 8 );
ret = ReadUBitLong( 8 );
break;
case 2:
return ReadUBitLong( 12 );
ret = ReadUBitLong( 12 );
break;
case 3:
return ReadUBitLong( 32 );
ret = ReadUBitLong( 32 );
break;
}
return ret;
}
#ifdef _WIN32
#pragma warning(pop)