Commit 10d67ffb authored by jean-pierre charras's avatar jean-pierre charras
Browse files

Fix some coverity warnings (not initialized members). Add comments. Better...

Fix some coverity warnings (not initialized members). Add comments. Better (more informative) title in dialog to download .pretty libs.
parent dbdadbf5
Loading
Loading
Loading
Loading
+12 −0
Original line number Original line Diff line number Diff line
@@ -80,6 +80,18 @@ EDA_3D_CANVAS::EDA_3D_CANVAS( EDA_3D_FRAME* parent, int* attribList ) :
{
{
    m_init   = false;
    m_init   = false;
    m_shadow_init = false;
    m_shadow_init = false;
    // set an invalide value to not yet initialized indexes managing
    // textures created to enhance 3D rendering
    // (they are dummy values but we do not want uninitialized values)
    m_text_pcb = m_text_silk = -1;
    m_text_fake_shadow_front = -1;
    m_text_fake_shadow_back = -1;
    m_text_fake_shadow_board = -1;

    // position of the front and back layers
    // (will be initialized to a better value later)
    m_ZBottom = 0.0;
    m_ZTop = 0.0;


    // Clear all gl list identifiers:
    // Clear all gl list identifiers:
    for( int ii = GL_ID_BEGIN; ii < GL_ID_END; ii++ )
    for( int ii = GL_ID_BEGIN; ii < GL_ID_END; ii++ )
+3 −2
Original line number Original line Diff line number Diff line
@@ -83,9 +83,10 @@ private:
    double          m_ZBottom;          // position of the back layer
    double          m_ZBottom;          // position of the back layer
    double          m_ZTop;             // position of the front layer
    double          m_ZTop;             // position of the front layer


    GLuint          m_text_pcb;
    GLuint          m_text_pcb;     // an index to the texture generated for pcb texts
    GLuint          m_text_silk;
    GLuint          m_text_silk;    // an index to the texture generated for silk layers


    // Index to the textures generated for shadows
    bool            m_shadow_init;
    bool            m_shadow_init;
    GLuint          m_text_fake_shadow_front;
    GLuint          m_text_fake_shadow_front;
    GLuint          m_text_fake_shadow_back;
    GLuint          m_text_fake_shadow_back;
+1 −0
Original line number Original line Diff line number Diff line
@@ -66,6 +66,7 @@ INFO3D_VISU::INFO3D_VISU()
    m_epoxyThickness    = 0;
    m_epoxyThickness    = 0;
    m_nonCopperLayerThickness = 0;
    m_nonCopperLayerThickness = 0;
    m_BiuTo3Dunits = 1.0;
    m_BiuTo3Dunits = 1.0;
    zpos_offset = 0.0;


    // Set copper color, in realistic mode
    // Set copper color, in realistic mode
    #define LUMINANCE 0.7/255.0
    #define LUMINANCE 0.7/255.0
+1 −0
Original line number Original line Diff line number Diff line
@@ -58,6 +58,7 @@ BITMAP_BASE::BITMAP_BASE( const wxPoint& pos )
BITMAP_BASE::BITMAP_BASE( const BITMAP_BASE& aSchBitmap )
BITMAP_BASE::BITMAP_BASE( const BITMAP_BASE& aSchBitmap )
{
{
    m_Scale = aSchBitmap.m_Scale;
    m_Scale = aSchBitmap.m_Scale;
    m_ppi   = aSchBitmap.m_ppi;
    m_pixelScaleFactor = aSchBitmap.m_pixelScaleFactor;
    m_pixelScaleFactor = aSchBitmap.m_pixelScaleFactor;
    m_image = new wxImage( *aSchBitmap.m_image );
    m_image = new wxImage( *aSchBitmap.m_image );
    m_bitmap = new wxBitmap( *m_image );
    m_bitmap = new wxBitmap( *m_image );
+22 −0
Original line number Original line Diff line number Diff line
@@ -2,6 +2,28 @@
 * @file common_plotDXF_functions.cpp
 * @file common_plotDXF_functions.cpp
 * @brief KiCad: Common plot DXF Routines.
 * @brief KiCad: Common plot DXF Routines.
 */
 */
/*
 * This program source code file is part of KiCad, a free EDA CAD application.
 *
 * Copyright (C) 2015 KiCad Developers, see CHANGELOG.TXT for contributors.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, you may find one here:
 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * or you may search the http://www.gnu.org website for the version 2 license,
 * or you may write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 */


#include <fctsys.h>
#include <fctsys.h>
#include <gr_basic.h>
#include <gr_basic.h>
Loading