Loading gerbview/gerbview.h +15 −4 Original line number Original line Diff line number Diff line Loading @@ -132,9 +132,9 @@ public: */ */ bool IsImmediate() const { return index == -1; } bool IsImmediate() const { return index == -1; } int GetIndex() const unsigned GetIndex() const { { return index; return (unsigned) index; } } void SetIndex( int aIndex ) void SetIndex( int aIndex ) Loading Loading @@ -235,6 +235,8 @@ typedef std::pair<APERTURE_MACRO_SET::iterator, bool> APERTURE_MACRO_SET_PAIR; */ */ class D_CODE class D_CODE { { friend class DCODE_PARAM; APERTURE_MACRO* m_Macro; ///< no ownership, points to GERBER.m_aperture_macros element APERTURE_MACRO* m_Macro; ///< no ownership, points to GERBER.m_aperture_macros element /** /** Loading Loading @@ -288,10 +290,19 @@ inline double DCODE_PARAM::GetValue( const D_CODE* aDcode ) const return value; return value; else else { { // get the parameter from aDcode // the first one was numbered 1, not zero, as in $1, see page 19 of spec. unsigned ndx = GetIndex() - 1; // get the parameter from the aDcode if( ndx < aDcode->m_am_params.size() ) return aDcode->m_am_params[ndx].GetValue( NULL ); else { wxASSERT( GetIndex()-1 < aDcode->m_am_params.size() ); return 0.0; return 0.0; } } } } } /** /** Loading gerbview/rs274d.cpp +2 −2 Original line number Original line Diff line number Diff line Loading @@ -967,11 +967,11 @@ bool GERBER::Execute_DCODE_Command( WinEDA_GerberFrame* frame, wxDC* DC, if( start.x == end.x ) if( start.x == end.x ) { { size.x = width; size.x = width; size.y = ABS( end.y - start.y ); size.y = ABS( end.y - start.y ) + 1; } } else else { { size.x = ABS( end.x - start.x ); size.x = ABS( end.x - start.x ) + 1; size.y = width; size.y = width; } } Loading Loading
gerbview/gerbview.h +15 −4 Original line number Original line Diff line number Diff line Loading @@ -132,9 +132,9 @@ public: */ */ bool IsImmediate() const { return index == -1; } bool IsImmediate() const { return index == -1; } int GetIndex() const unsigned GetIndex() const { { return index; return (unsigned) index; } } void SetIndex( int aIndex ) void SetIndex( int aIndex ) Loading Loading @@ -235,6 +235,8 @@ typedef std::pair<APERTURE_MACRO_SET::iterator, bool> APERTURE_MACRO_SET_PAIR; */ */ class D_CODE class D_CODE { { friend class DCODE_PARAM; APERTURE_MACRO* m_Macro; ///< no ownership, points to GERBER.m_aperture_macros element APERTURE_MACRO* m_Macro; ///< no ownership, points to GERBER.m_aperture_macros element /** /** Loading Loading @@ -288,10 +290,19 @@ inline double DCODE_PARAM::GetValue( const D_CODE* aDcode ) const return value; return value; else else { { // get the parameter from aDcode // the first one was numbered 1, not zero, as in $1, see page 19 of spec. unsigned ndx = GetIndex() - 1; // get the parameter from the aDcode if( ndx < aDcode->m_am_params.size() ) return aDcode->m_am_params[ndx].GetValue( NULL ); else { wxASSERT( GetIndex()-1 < aDcode->m_am_params.size() ); return 0.0; return 0.0; } } } } } /** /** Loading
gerbview/rs274d.cpp +2 −2 Original line number Original line Diff line number Diff line Loading @@ -967,11 +967,11 @@ bool GERBER::Execute_DCODE_Command( WinEDA_GerberFrame* frame, wxDC* DC, if( start.x == end.x ) if( start.x == end.x ) { { size.x = width; size.x = width; size.y = ABS( end.y - start.y ); size.y = ABS( end.y - start.y ) + 1; } } else else { { size.x = ABS( end.x - start.x ); size.x = ABS( end.x - start.x ) + 1; size.y = width; size.y = width; } } Loading