Added initialization of variable, preventing unconditional jumps. Fixed typos in comments.

This commit is contained in:
Maciej Suminski 2013-07-29 14:12:27 +02:00
parent ee1b8e2a80
commit be012cac94
5 changed files with 6 additions and 5 deletions

View File

@ -52,7 +52,7 @@ GPU_MANAGER* GPU_MANAGER::MakeManager( VERTEX_CONTAINER* aContainer )
GPU_MANAGER::GPU_MANAGER( VERTEX_CONTAINER* aContainer ) : GPU_MANAGER::GPU_MANAGER( VERTEX_CONTAINER* aContainer ) :
m_container( aContainer ), m_shader( NULL ) m_isDrawing( false ), m_container( aContainer ), m_shader( NULL )
{ {
} }

View File

@ -167,7 +167,7 @@ void STROKE_FONT::Draw( std::string aText, const VECTOR2D& aPosition, double aRo
switch( m_horizontalJustify ) switch( m_horizontalJustify )
{ {
case GR_TEXT_HJUSTIFY_CENTER: case GR_TEXT_HJUSTIFY_CENTER:
m_gal->Translate( VECTOR2D( -textsize.x / 2, 0 ) ); m_gal->Translate( VECTOR2D( -textsize.x / 2.0, 0 ) );
break; break;
case GR_TEXT_HJUSTIFY_RIGHT: case GR_TEXT_HJUSTIFY_RIGHT:
@ -187,7 +187,7 @@ void STROKE_FONT::Draw( std::string aText, const VECTOR2D& aPosition, double aRo
switch( m_verticalJustify ) switch( m_verticalJustify )
{ {
case GR_TEXT_VJUSTIFY_CENTER: case GR_TEXT_VJUSTIFY_CENTER:
m_gal->Translate( VECTOR2D( 0, textsize.y / 2 ) ); m_gal->Translate( VECTOR2D( 0, textsize.y / 2.0 ) );
break; break;
case GR_TEXT_VJUSTIFY_TOP: case GR_TEXT_VJUSTIFY_TOP:

View File

@ -474,6 +474,8 @@ struct VIEW::drawItem
{ {
GAL* gal = view->GetGAL(); GAL* gal = view->GetGAL();
// Obtain layers that are required to be enabled for drawing an item
// (eg. there is no point in drawing track labels, if the track is not visible)
aItem->ViewGetRequiredLayers( layers, layersCount ); aItem->ViewGetRequiredLayers( layers, layersCount );
// Conditions that have te be fulfilled for an item to be drawn // Conditions that have te be fulfilled for an item to be drawn

View File

@ -47,7 +47,6 @@ public:
virtual ~GPU_MANAGER(); virtual ~GPU_MANAGER();
// TODO docs
/** /**
* @brief Initializes everything needed to use vertex buffer objects (should be called when * @brief Initializes everything needed to use vertex buffer objects (should be called when
* there is an OpenGL context available). * there is an OpenGL context available).

View File

@ -793,7 +793,7 @@ void D_PAD::ViewGetRequiredLayers( int aLayers[], int& aCount ) const
} }
else else
{ {
// Resto of pads have one soldermask layer and one description layer // Rest of pads have one soldermask layer and one description layer
aCount -= 2; aCount -= 2;
} }
} }