Coverity fixes (mostly initializing variables)

This commit is contained in:
Maciej Suminski 2017-01-31 21:35:52 +01:00
parent bce04c930d
commit 77af6547c1
6 changed files with 27 additions and 4 deletions

View File

@ -127,8 +127,8 @@ namespace {
ANTIALIASING_SUPERSAMPLING::ANTIALIASING_SUPERSAMPLING( OPENGL_COMPOSITOR* aCompositor,
SUPERSAMPLING_MODE aMode )
: compositor( aCompositor ), mode( aMode ), areBuffersCreated( false ),
areShadersCreated( false )
: compositor( aCompositor ), mode( aMode ), ssaaMainBuffer( 0 ),
areBuffersCreated( false ), areShadersCreated( false )
{
}
@ -234,6 +234,15 @@ ANTIALIASING_SMAA::ANTIALIASING_SMAA( OPENGL_COMPOSITOR* aCompositor, SMAA_QUALI
: areBuffersInitialized( false ), shadersLoaded( false ),
quality( aQuality ), compositor( aCompositor )
{
smaaBaseBuffer = 0;
smaaEdgesBuffer = 0;
smaaBlendBuffer = 0;
smaaAreaTex = 0;
smaaSearchTex = 0;
pass_1_metrics = 0;
pass_2_metrics = 0;
pass_3_metrics = 0;
}

View File

@ -35,6 +35,10 @@ namespace KIGFX {
class OPENGL_PRESENTOR
{
public:
virtual ~OPENGL_PRESENTOR()
{
}
virtual bool Init() = 0;
virtual unsigned int CreateBuffer() = 0;

View File

@ -38,7 +38,8 @@ using namespace KIGFX;
OPENGL_COMPOSITOR::OPENGL_COMPOSITOR() :
m_initialized( false ), m_curBuffer( 0 ),
m_mainFbo( 0 ), m_depthBuffer( 0 ), m_curFbo( DIRECT_RENDERING )
m_mainFbo( 0 ), m_depthBuffer( 0 ), m_curFbo( DIRECT_RENDERING ),
m_currentAntialiasingMode( OPENGL_ANTIALIASING_MODE::NONE )
{
m_antialiasing.reset( new ANTIALIASING_NONE( this ) );
}

View File

@ -28,7 +28,7 @@ namespace UTIL {
namespace DETAIL {
template< typename T >
template<typename T>
struct equals {
equals( const T& val ) : val_( val ) {}
@ -96,6 +96,12 @@ namespace UTIL {
{
auto it = std::find( observers_.begin(), observers_.end(), observer );
if( it == observers_.end() )
{
assert( false );
return;
}
if( is_iterating() )
*it = nullptr;
else
@ -112,6 +118,7 @@ namespace UTIL {
LINK::LINK()
: observer_( nullptr )
{
}

View File

@ -49,6 +49,7 @@ PCB_RENDER_SETTINGS::PCB_RENDER_SETTINGS()
m_netNamesOnPads = true;
m_netNamesOnTracks = true;
m_displayZone = DZ_SHOW_FILLED;
m_clearance = CL_NONE;
// By default everything should be displayed as filled
for( unsigned int i = 0; i < TOTAL_LAYER_COUNT; ++i )

View File

@ -454,6 +454,7 @@ PNS_KICAD_IFACE::PNS_KICAD_IFACE()
m_world = nullptr;
m_router = nullptr;
m_debugDecorator = nullptr;
m_dispOptions = nullptr;
}