Changeset 607 for trunk/libffado/src/genericavc/avc_vendormodel.cpp
- Timestamp:
- 08/31/07 01:56:53 (17 years ago)
- Files:
-
- trunk/libffado/src/genericavc/avc_vendormodel.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libffado/src/genericavc/avc_vendormodel.cpp
r599 r607 83 83 84 84 return *this; 85 } 86 87 bool 88 GenericAVC::VendorModelEntry::operator == ( const VendorModelEntry& rhs ) const 89 { 90 bool equal=true; 91 92 equal &= (vendor_id == rhs.vendor_id); 93 equal &= (model_id == rhs.model_id); 94 equal &= (vendor_name == rhs.vendor_name); 95 equal &= (model_name == rhs.model_name); 96 97 return equal; 85 98 } 86 99 … … 194 207 }; 195 208 196 GenericAVC::VendorModelEntry *209 GenericAVC::VendorModelEntry 197 210 GenericAVC::VendorModel::find( unsigned int vendor_id, unsigned model_id ) 198 211 { … … 202 215 is_same( vendor_id, model_id ) ); 203 216 if ( it != m_vendorModelEntries.end() ) 204 return &*it; 205 206 return 0; 217 return *it; 218 219 struct VendorModelEntry invalid; 220 return invalid; 221 } 222 223 bool 224 GenericAVC::VendorModel::isPresent( unsigned int vendor_id, unsigned model_id ) 225 { 226 VendorModelEntryVector::iterator it = 227 find_if ( m_vendorModelEntries.begin(), 228 m_vendorModelEntries.end(), 229 is_same( vendor_id, model_id ) ); 230 if ( it != m_vendorModelEntries.end() ) 231 return true; 232 233 return false; 234 } 235 236 bool 237 GenericAVC::VendorModel::isValid( const GenericAVC::VendorModelEntry& vme ) 238 { 239 struct VendorModelEntry invalid; 240 return !(vme==invalid); 207 241 } 208 242