Commit 9fe9fc7c authored by dickelbeck's avatar dickelbeck

fix macro to inline conversion

parent edc9268c
...@@ -98,11 +98,15 @@ int GRMapY( int y ) ...@@ -98,11 +98,15 @@ int GRMapY( int y )
} }
#define WHEN_OUTSIDE return #define WHEN_OUTSIDE return true;
#define WHEN_INSIDE #define WHEN_INSIDE
static inline void clip_line( int& x1, int& y1, int& x2, int& y2 ) /**
* Function clip_line
* @return bool - true when WHEN_OUTSIDE fires, else false.
*/
static inline bool clip_line( int& x1, int& y1, int& x2, int& y2 )
{ {
int temp; int temp;
...@@ -197,6 +201,8 @@ static inline void clip_line( int& x1, int& y1, int& x2, int& y2 ) ...@@ -197,6 +201,8 @@ static inline void clip_line( int& x1, int& y1, int& x2, int& y2 )
WHEN_INSIDE; WHEN_INSIDE;
} }
} }
return false;
} }
...@@ -220,7 +226,8 @@ static void WinClipAndDrawLine( EDA_Rect* ClipBox, wxDC* DC, ...@@ -220,7 +226,8 @@ static void WinClipAndDrawLine( EDA_Rect* ClipBox, wxDC* DC,
xcliphi += width; xcliphi += width;
ycliphi += width; ycliphi += width;
clip_line( x1, y1, x2, y2 ); if( clip_line( x1, y1, x2, y2 ) )
return;
} }
GRSetColorPen( DC, Color, width ); GRSetColorPen( DC, Color, width );
...@@ -673,7 +680,8 @@ void GRSCSegm( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2, int ...@@ -673,7 +680,8 @@ void GRSCSegm( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2, int
xcliphi += width; xcliphi += width;
ycliphi += width; ycliphi += width;
clip_line( x1, y1, x2, y2 ); if( clip_line( x1, y1, x2, y2 ) )
return;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment