calm down fall through warnings

This commit is contained in:
Garux 2019-02-22 23:50:10 +03:00
parent eb95c73416
commit 07d3008b96
4 changed files with 15 additions and 12 deletions

View File

@ -203,17 +203,17 @@ inline ub4 hash(
c += length; c += length;
switch ( len ) /* all the case statements fall through */ switch ( len ) /* all the case statements fall through */
{ {
case 11: c += ( ( ub4 ) UB1Traits::as_ub1( k[10] ) << 24 ); case 11: c += ( ( ub4 ) UB1Traits::as_ub1( k[10] ) << 24 ); // fall through
case 10: c += ( ( ub4 ) UB1Traits::as_ub1( k[9] ) << 16 ); case 10: c += ( ( ub4 ) UB1Traits::as_ub1( k[9] ) << 16 ); // fall through
case 9: c += ( ( ub4 ) UB1Traits::as_ub1( k[8] ) << 8 ); case 9: c += ( ( ub4 ) UB1Traits::as_ub1( k[8] ) << 8 ); // fall through
/* the first byte of c is reserved for the length */ /* the first byte of c is reserved for the length */
case 8: b += ( ( ub4 ) UB1Traits::as_ub1( k[7] ) << 24 ); case 8: b += ( ( ub4 ) UB1Traits::as_ub1( k[7] ) << 24 ); // fall through
case 7: b += ( ( ub4 ) UB1Traits::as_ub1( k[6] ) << 16 ); case 7: b += ( ( ub4 ) UB1Traits::as_ub1( k[6] ) << 16 ); // fall through
case 6: b += ( ( ub4 ) UB1Traits::as_ub1( k[5] ) << 8 ); case 6: b += ( ( ub4 ) UB1Traits::as_ub1( k[5] ) << 8 ); // fall through
case 5: b += UB1Traits::as_ub1( k[4] ); case 5: b += UB1Traits::as_ub1( k[4] ); // fall through
case 4: a += ( ( ub4 ) UB1Traits::as_ub1( k[3] ) << 24 ); case 4: a += ( ( ub4 ) UB1Traits::as_ub1( k[3] ) << 24 ); // fall through
case 3: a += ( ( ub4 ) UB1Traits::as_ub1( k[2] ) << 16 ); case 3: a += ( ( ub4 ) UB1Traits::as_ub1( k[2] ) << 16 ); // fall through
case 2: a += ( ( ub4 ) UB1Traits::as_ub1( k[1] ) << 8 ); case 2: a += ( ( ub4 ) UB1Traits::as_ub1( k[1] ) << 8 ); // fall through
case 1: a += UB1Traits::as_ub1( k[0] ); case 1: a += UB1Traits::as_ub1( k[0] );
/* case 0: nothing left to add */ /* case 0: nothing left to add */
} }

View File

@ -278,6 +278,7 @@ scene::Node& parsePrimitive( Tokeniser& tokeniser ) const {
case eBrushTypeQuake3: case eBrushTypeQuake3:
case eBrushTypeQuake3Valve220: case eBrushTypeQuake3Valve220:
tokeniser.ungetToken(); // ( tokeniser.ungetToken(); // (
// fall through
case eBrushTypeQuake3BP: case eBrushTypeQuake3BP:
return GlobalBrushCreator().createBrush(); return GlobalBrushCreator().createBrush();
default: default:
@ -355,6 +356,7 @@ scene::Node& parsePrimitive( Tokeniser& tokeniser ) const {
case eBrushTypeQuake: case eBrushTypeQuake:
case eBrushTypeValve220: case eBrushTypeValve220:
tokeniser.ungetToken(); // ( tokeniser.ungetToken(); // (
// fall through
case eBrushTypeQuake3BP: case eBrushTypeQuake3BP:
return GlobalBrushCreator().createBrush(); return GlobalBrushCreator().createBrush();
default: default:
@ -473,6 +475,7 @@ scene::Node& parsePrimitive( Tokeniser& tokeniser ) const {
case eBrushTypeQuake2: case eBrushTypeQuake2:
case eBrushTypeQuake3Valve220: case eBrushTypeQuake3Valve220:
tokeniser.ungetToken(); // ( tokeniser.ungetToken(); // (
// fall through
case eBrushTypeQuake3BP: case eBrushTypeQuake3BP:
return GlobalBrushCreator().createBrush(); return GlobalBrushCreator().createBrush();
default: default:

View File

@ -729,7 +729,7 @@ void Camera_motionDelta( int x, int y, unsigned int state, void* data ){
cam->m_strafe_forward = true; cam->m_strafe_forward = true;
break; break;
case 4: case 4:
cam->m_strafe_forward_invert = true; cam->m_strafe_forward_invert = true; // fall through
default: /* 3 & 4 */ default: /* 3 & 4 */
cam->m_strafe = ( state & GDK_CONTROL_MASK ) || ( state & GDK_BUTTON3_MASK ) || ( state & GDK_SHIFT_MASK ); cam->m_strafe = ( state & GDK_CONTROL_MASK ) || ( state & GDK_BUTTON3_MASK ) || ( state & GDK_SHIFT_MASK );
cam->m_strafe_forward = ( state & GDK_SHIFT_MASK ) != 0; cam->m_strafe_forward = ( state & GDK_SHIFT_MASK ) != 0;

View File

@ -4245,7 +4245,7 @@ public:
viewdir_make_cut_worthy( plane3_for_points( m_points[0].m_point, m_points[1].m_point, m_points[2].m_point ) ); viewdir_make_cut_worthy( plane3_for_points( m_points[0].m_point, m_points[1].m_point, m_points[2].m_point ) );
} }
m_points[2].m_point = m_points[0].m_point + m_viewdir * vector3_length( m_points[0].m_point - m_points[1].m_point ); m_points[2].m_point = m_points[0].m_point + m_viewdir * vector3_length( m_points[0].m_point - m_points[1].m_point );
} } // fall through
case 3: case 3:
Clipper_setPlanePoints( ClipperPoints( m_points[0].m_point, m_points[1].m_point, m_points[2].m_point, npoints ) ); Clipper_setPlanePoints( ClipperPoints( m_points[0].m_point, m_points[1].m_point, m_points[2].m_point, npoints ) );
break; break;