Coverity fixes.
This commit is contained in:
parent
89c0f8e297
commit
0365c6bf4b
|
@ -36,8 +36,9 @@ void STROKE_PARAMS::Stroke( const SHAPE* aShape, PLOT_DASH_TYPE aLineStyle, int
|
||||||
const KIGFX::RENDER_SETTINGS* aRenderSettings,
|
const KIGFX::RENDER_SETTINGS* aRenderSettings,
|
||||||
std::function<void( const VECTOR2I& a, const VECTOR2I& b )> aStroker )
|
std::function<void( const VECTOR2I& a, const VECTOR2I& b )> aStroker )
|
||||||
{
|
{
|
||||||
double strokes[6] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
|
double strokes[6] = { aWidth * 1.0, aWidth * 1.0, aWidth * 1.0, aWidth * 1.0, aWidth * 1.0,
|
||||||
int wrapAround = 0;
|
aWidth * 1.0 };
|
||||||
|
int wrapAround = 6;
|
||||||
|
|
||||||
switch( aLineStyle )
|
switch( aLineStyle )
|
||||||
{
|
{
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <macros.h>
|
||||||
#include <pcb_text.h>
|
#include <pcb_text.h>
|
||||||
#include <fp_text.h>
|
#include <fp_text.h>
|
||||||
#include <drc/drc_engine.h>
|
#include <drc/drc_engine.h>
|
||||||
|
@ -105,8 +106,10 @@ bool DRC_TEST_PROVIDER_TEXT_DIMS::Run()
|
||||||
|
|
||||||
wxASSERT( item->Type() == PCB_TEXT_T || item->Type() == PCB_FP_TEXT_T );
|
wxASSERT( item->Type() == PCB_TEXT_T || item->Type() == PCB_FP_TEXT_T );
|
||||||
|
|
||||||
int actualH = 0, actualT = 0;
|
DRC_CONSTRAINT constraint;
|
||||||
bool visible;
|
int actualH = 0;
|
||||||
|
int actualT = 0;
|
||||||
|
bool visible = false;
|
||||||
|
|
||||||
if( item->Type() == PCB_TEXT_T )
|
if( item->Type() == PCB_TEXT_T )
|
||||||
{
|
{
|
||||||
|
@ -115,15 +118,17 @@ bool DRC_TEST_PROVIDER_TEXT_DIMS::Run()
|
||||||
actualH = textItem->GetTextHeight();
|
actualH = textItem->GetTextHeight();
|
||||||
actualT = textItem->GetTextThickness();
|
actualT = textItem->GetTextThickness();
|
||||||
}
|
}
|
||||||
else if ( item->Type() == PCB_FP_TEXT_T )
|
else if( item->Type() == PCB_FP_TEXT_T )
|
||||||
{
|
{
|
||||||
FP_TEXT* fpTextItem = static_cast<FP_TEXT*>( item );
|
FP_TEXT* fpTextItem = static_cast<FP_TEXT*>( item );
|
||||||
visible = fpTextItem->IsVisible();
|
visible = fpTextItem->IsVisible();
|
||||||
actualH = fpTextItem->GetTextHeight();
|
actualH = fpTextItem->GetTextHeight();
|
||||||
actualT = fpTextItem->GetTextThickness();
|
actualT = fpTextItem->GetTextThickness();
|
||||||
}
|
}
|
||||||
DRC_CONSTRAINT constraint;
|
else
|
||||||
|
{
|
||||||
|
UNIMPLEMENTED_FOR( item->GetClass() );
|
||||||
|
}
|
||||||
|
|
||||||
if( !visible )
|
if( !visible )
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue