ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/SiteMapper/Page.cpp
(Generate patch)

Comparing SiteMapper/Page.cpp (file contents):
Revision 140 by Douglas Thrift, 2004-03-25T18:04:04-08:00 vs.
Revision 143 by Douglas Thrift, 2004-03-31T22:55:16-08:00

# Line 89 | Line 89 | bool Page::operator==(const Page& page)
89   {
90          if (address == page.address)
91          {
92 <                if (path == page.path || title == page.title) return true;
92 >                return path == page.path || title == page.title;
93          }
94  
95          return false;
96   }
97  
98 bool Page::operator<(const Page& page) const
99 {
100        if (address == page.address)
101        {
102                return path < page.path;
103        }
104
105        return address < page.address;
106 }
107
108 bool Page::operator>(const Page& page) const
109 {
110        if (address == page.address)
111        {
112                return path > page.path;
113        }
114
115        return address > page.address;
116 }
117
98   ostream& operator<<(ostream& output, Page& page)
99   {
100          string tab(page.tab, '\t');
# Line 126 | Line 106 | ostream& operator<<(ostream& output, Pag
106          {
107                  output << tab << "\t<list>\n";
108  
109 <                for (list<Page>::iterator itor = page.children.begin(); itor !=
130 <                        page.children.end(); itor++)
109 >                for (unsigned index = 0; index < page.children.size(); index++)
110                  {
111 <                        output << (*itor)(page.tab + 1) << '\n';
111 >                        output << page.children[index](page.tab + 1) << '\n';
112                  }
113  
114                  output << tab << "\t</list>\n";

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines