1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2025-01-03 16:13:22 +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:23:18 -05:00
parent c8b9c464d9
commit 6c38e2e589

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)