Fix another Coverity warning.
This commit is contained in:
parent
4ea8f29a43
commit
73c7154891
|
@ -405,19 +405,18 @@ CLAYERS_OGL_DISP_LISTS* C3D_RENDER_OGL_LEGACY::generateLayerListFromContainer( c
|
||||||
m_boardAdapter.BiuTo3Dunits(), false );
|
m_boardAdapter.BiuTo3Dunits(), false );
|
||||||
// Create display list
|
// Create display list
|
||||||
// /////////////////////////////////////////////////////////////////////
|
// /////////////////////////////////////////////////////////////////////
|
||||||
return new CLAYERS_OGL_DISP_LISTS( *layerTriangles,
|
return new CLAYERS_OGL_DISP_LISTS( *layerTriangles, m_ogl_circle_texture,
|
||||||
m_ogl_circle_texture,
|
layer_z_bot, layer_z_top );
|
||||||
layer_z_bot,
|
|
||||||
layer_z_top );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CLAYERS_OGL_DISP_LISTS* C3D_RENDER_OGL_LEGACY::createBoard( SHAPE_POLY_SET aBoardPoly )
|
CLAYERS_OGL_DISP_LISTS* C3D_RENDER_OGL_LEGACY::createBoard( const SHAPE_POLY_SET& aBoardPoly )
|
||||||
{
|
{
|
||||||
CLAYERS_OGL_DISP_LISTS* dispLists = nullptr;
|
CLAYERS_OGL_DISP_LISTS* dispLists = nullptr;
|
||||||
CCONTAINER2D boardContainer;
|
CCONTAINER2D boardContainer;
|
||||||
Convert_shape_line_polygon_to_triangles( aBoardPoly,
|
SHAPE_POLY_SET brd_outlines = aBoardPoly;
|
||||||
boardContainer,
|
|
||||||
|
Convert_shape_line_polygon_to_triangles( brd_outlines, boardContainer,
|
||||||
m_boardAdapter.BiuTo3Dunits(),
|
m_boardAdapter.BiuTo3Dunits(),
|
||||||
(const BOARD_ITEM &)*m_boardAdapter.GetBoard() );
|
(const BOARD_ITEM &)*m_boardAdapter.GetBoard() );
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool initializeOpenGL();
|
bool initializeOpenGL();
|
||||||
CLAYERS_OGL_DISP_LISTS* createBoard( SHAPE_POLY_SET aBoardPoly );
|
CLAYERS_OGL_DISP_LISTS* createBoard( const SHAPE_POLY_SET& aBoardPoly );
|
||||||
void reload( REPORTER* aStatusReporter, REPORTER* aWarningReporter );
|
void reload( REPORTER* aStatusReporter, REPORTER* aWarningReporter );
|
||||||
|
|
||||||
void ogl_set_arrow_material();
|
void ogl_set_arrow_material();
|
||||||
|
|
|
@ -852,7 +852,8 @@ void OPENGL_GAL::DrawArcSegment( const VECTOR2D& aCenterPoint, double aRadius, d
|
||||||
seg_count += 1;
|
seg_count += 1;
|
||||||
|
|
||||||
// Recalculate alphaIncrement with a even integer number of segment
|
// Recalculate alphaIncrement with a even integer number of segment
|
||||||
alphaIncrement = (aEndAngle -aStartAngle ) / seg_count;
|
if( seg_count )
|
||||||
|
alphaIncrement = (aEndAngle -aStartAngle ) / seg_count;
|
||||||
|
|
||||||
Save();
|
Save();
|
||||||
currentManager->Translate( aCenterPoint.x, aCenterPoint.y, 0.0 );
|
currentManager->Translate( aCenterPoint.x, aCenterPoint.y, 0.0 );
|
||||||
|
|
Loading…
Reference in New Issue