Commit be012cac authored by Maciej Suminski's avatar Maciej Suminski
Browse files

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

parent ee1b8e2a
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -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 )
{
{
}
}


+2 −2
Original line number Original line Diff line number Diff line
@@ -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:
+2 −0
Original line number Original line Diff line number Diff line
@@ -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
+0 −1
Original line number Original line Diff line number Diff line
@@ -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).
+1 −1
Original line number Original line Diff line number Diff line
@@ -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;
    }
    }
}
}