From 2fa6f00bd6a4a6e2a2562ed453da0d6acca12496 Mon Sep 17 00:00:00 2001 From: dickelbeck Date: Sat, 17 May 2008 19:10:36 +0000 Subject: [PATCH] debug statements --- common/base_struct.cpp | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/common/base_struct.cpp b/common/base_struct.cpp index dc07dcfb0e..9b1f8ac379 100644 --- a/common/base_struct.cpp +++ b/common/base_struct.cpp @@ -669,6 +669,16 @@ bool EDA_Rect::Inside( const wxPoint& point ) bool EDA_Rect::Intersects( const EDA_Rect aRect ) const { // this logic taken from wxWidgets' geometry.cpp file: + bool rc; + +#if 0 && defined(DEBUG) + + std::cout << "this: "; + std::cout << m_Pos << m_Size << '\n'; + std::cout << "aRect: "; + std::cout << aRect.m_Pos << aRect.m_Size; + +#endif int left = MAX( m_Pos.x, aRect.m_Pos.x ); int right = MIN( m_Pos.x + m_Size.x, aRect.m_Pos.x + aRect.m_Size.x ); @@ -676,10 +686,13 @@ bool EDA_Rect::Intersects( const EDA_Rect aRect ) const int bottom = MIN( m_Pos.y + m_Size.y, aRect.m_Pos.y + aRect.m_Size.y ); if( left < right && top < bottom ) - { - return true; - } - return false; + rc = true; + else + rc = false; + + //D( std::cout << "rc=" << rc << '\n'; ) + + return rc; }