/[paragui]/paragui/src/core/pgrectlist.cpp
ViewVC logotype

Diff of /paragui/src/core/pgrectlist.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.6.2.2.2 by braindead, Mon Nov 24 09:17:21 2003 UTC revision 1.1.6.2.2.3 by braindead, Tue Dec 2 15:27:58 2003 UTC
# Line 38  PG_RectList::PG_RectList() {} Line 38  PG_RectList::PG_RectList() {}
38  PG_RectList::~PG_RectList() {}  PG_RectList::~PG_RectList() {}
39    
40  PG_RectList PG_RectList::Intersect(PG_Rect* rect, int first, int last) {  PG_RectList PG_RectList::Intersect(PG_Rect* rect, int first, int last) {
41            // <DEBUG>
42            static long total_calls = 0;
43            static long total_iterations = 0;
44            
45            total_calls++;
46            // </DEBUG>
47            
48          PG_RectList result;          PG_RectList result;
49          int s = (last == -1) ? size() : last;          int s = (last == -1) ? size() : last;
50    
# Line 50  PG_RectList PG_RectList::Intersect(PG_Re Line 57  PG_RectList PG_RectList::Intersect(PG_Re
57          // loop through all rects          // loop through all rects
58          for(int i=first; i<s; i++) {          for(int i=first; i<s; i++) {
59    
60                    // <DEBUG>
61                    total_iterations++;
62                    // </DEBUG>
63                    
64                  // get the next rectangle to test                  // get the next rectangle to test
65                  testwidget = (*this)[i];                  testwidget = (*this)[i];
66    
# Line 64  PG_RectList PG_RectList::Intersect(PG_Re Line 75  PG_RectList PG_RectList::Intersect(PG_Re
75                  }                  }
76          }          }
77    
78            // <DEBUG>
79            //PG_LogDBG("Total calls: %d", total_calls);
80            //PG_LogDBG("Total iterations: %d", total_iterations);
81            //PG_LogDBG("Avg. iterations per call: %lf", (double)total_iterations/(double)total_calls);
82            // </DEBUG>
83    
84          return result;          return result;
85  }  }
86    

Legend:
Removed from v.1.1.6.2.2.2  
changed lines
  Added in v.1.1.6.2.2.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26