Minor style corrections.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@344 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
2b9010b0b1
commit
53dfc57542
@ -67,13 +67,13 @@ static SFG_Font* fghFontByID( void* font )
|
|||||||
* XXX statements properly. Jamming "return" on the end of an
|
* XXX statements properly. Jamming "return" on the end of an
|
||||||
* XXX "if" is just bad style, IMHO.
|
* XXX "if" is just bad style, IMHO.
|
||||||
*/
|
*/
|
||||||
if( font == GLUT_BITMAP_8_BY_13 ) return( &fgFontFixed8x13 );
|
if( font == GLUT_BITMAP_8_BY_13 ) return &fgFontFixed8x13;
|
||||||
if( font == GLUT_BITMAP_9_BY_15 ) return( &fgFontFixed9x15 );
|
if( font == GLUT_BITMAP_9_BY_15 ) return &fgFontFixed9x15;
|
||||||
if( font == GLUT_BITMAP_HELVETICA_10 ) return( &fgFontHelvetica10 );
|
if( font == GLUT_BITMAP_HELVETICA_10 ) return &fgFontHelvetica10;
|
||||||
if( font == GLUT_BITMAP_HELVETICA_12 ) return( &fgFontHelvetica12 );
|
if( font == GLUT_BITMAP_HELVETICA_12 ) return &fgFontHelvetica12;
|
||||||
if( font == GLUT_BITMAP_HELVETICA_18 ) return( &fgFontHelvetica18 );
|
if( font == GLUT_BITMAP_HELVETICA_18 ) return &fgFontHelvetica18;
|
||||||
if( font == GLUT_BITMAP_TIMES_ROMAN_10 ) return( &fgFontTimesRoman10 );
|
if( font == GLUT_BITMAP_TIMES_ROMAN_10 ) return &fgFontTimesRoman10;
|
||||||
if( font == GLUT_BITMAP_TIMES_ROMAN_24 ) return( &fgFontTimesRoman24 );
|
if( font == GLUT_BITMAP_TIMES_ROMAN_24 ) return &fgFontTimesRoman24;
|
||||||
fgError( "font 0x%08x not found", font );
|
fgError( "font 0x%08x not found", font );
|
||||||
return 0; /*** NOT REACHED ***/
|
return 0; /*** NOT REACHED ***/
|
||||||
}
|
}
|
||||||
@ -88,8 +88,8 @@ static SFG_StrokeFont* fghStrokeByID( void* font )
|
|||||||
* XXX Same comment as above about jamming "return" in after an
|
* XXX Same comment as above about jamming "return" in after an
|
||||||
* XXX "if".
|
* XXX "if".
|
||||||
*/
|
*/
|
||||||
if( font == GLUT_STROKE_ROMAN ) return( &fgStrokeRoman );
|
if( font == GLUT_STROKE_ROMAN ) return &fgStrokeRoman;
|
||||||
if( font == GLUT_STROKE_MONO_ROMAN ) return( &fgStrokeMonoRoman );
|
if( font == GLUT_STROKE_MONO_ROMAN ) return &fgStrokeMonoRoman;
|
||||||
fgError( "stroke font 0x%08x not found", font );
|
fgError( "stroke font 0x%08x not found", font );
|
||||||
return 0; /*** NOT REACHED ***/
|
return 0; /*** NOT REACHED ***/
|
||||||
}
|
}
|
||||||
@ -225,7 +225,8 @@ void FGAPIENTRY glutStrokeCharacter( void* fontID, int character )
|
|||||||
int i, j;
|
int i, j;
|
||||||
SFG_StrokeFont* font = fghStrokeByID( fontID );
|
SFG_StrokeFont* font = fghStrokeByID( fontID );
|
||||||
|
|
||||||
freeglut_return_if_fail( character >= 0 && character < font->Quantity );
|
freeglut_return_if_fail( character >= 0 );
|
||||||
|
freeglut_return_if_fail( character < font->Quantity );
|
||||||
|
|
||||||
schar = font->Characters[ character ];
|
schar = font->Characters[ character ];
|
||||||
freeglut_return_if_fail( schar );
|
freeglut_return_if_fail( schar );
|
||||||
@ -295,7 +296,8 @@ int FGAPIENTRY glutStrokeWidth( void* fontID, int character )
|
|||||||
|
|
||||||
freeglut_return_val_if_fail( ( character >= 0 ) &&
|
freeglut_return_val_if_fail( ( character >= 0 ) &&
|
||||||
( character < font->Quantity ),
|
( character < font->Quantity ),
|
||||||
0 );
|
0
|
||||||
|
);
|
||||||
schar = font->Characters[ character ];
|
schar = font->Characters[ character ];
|
||||||
freeglut_return_val_if_fail( schar, 0 );
|
freeglut_return_val_if_fail( schar, 0 );
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user