Changeset 3705 for source/ariba/communication/EndpointDescriptor.cpp
- Timestamp:
- May 26, 2009, 4:27:55 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/communication/EndpointDescriptor.cpp
r3690 r3705 112 112 bool EndpointDescriptor::operator==(const EndpointDescriptor& rh) const { 113 113 114 if( locator != NULL && rh.locator != NULL ) 115 return ( locator->operator==(*rh.locator) ); 114 if( isUnspecified() && rh.isUnspecified() ) { 116 115 117 if( locator != rh.locator ) 116 // both unspec bit set 117 return true; 118 119 } else if( (!isUnspecified()) && (!rh.isUnspecified()) ) { 120 121 // 122 // both are valid, check locators 123 // 124 125 if( locator == NULL && rh.locator == NULL ){ 126 127 // both locators are invalid, ok true 128 return true; 129 130 } else if( locator == NULL ^ rh.locator == NULL ) { 131 132 // one locator is invalid, the other not, false 133 return false; 134 135 } else { 136 137 // both locators are valid, compare 138 assert( locator != NULL && rh.locator != NULL ); 139 return ( locator->operator==(*rh.locator) ); 140 141 } 142 143 } else { 144 145 // one is unspec, the other not 146 assert( isUnspecified() ^ rh.isUnspecified() ); 118 147 return false; 119 148 120 return (isUnspec == rh.isUnspec); 149 } 150 121 151 } 122 152
Note:
See TracChangeset
for help on using the changeset viewer.