| 110 | } |
| 111 | |
| 112 | void FeatureSet::setFeature( const FeatureType &type, bool set, S32 index ) |
| 113 | { |
| 114 | for ( U32 i=0; i < mFeatures.size(); i++ ) |
| 115 | { |
| 116 | const FeatureInfo &info = mFeatures[i]; |
| 117 | if ( info.type == &type && info.index == index ) |
| 118 | { |
| 119 | if ( set ) |
| 120 | return; |
| 121 | else |
| 122 | { |
| 123 | mFeatures.erase_fast( i ); |
| 124 | mDescription.clear(); |
| 125 | return; |
| 126 | } |
| 127 | } |
| 128 | } |
| 129 | |
| 130 | if ( !set ) |
| 131 | return; |
| 132 | |
| 133 | FeatureInfo info; |
| 134 | info.type = &type; |
| 135 | info.index = index; |
| 136 | mFeatures.push_back( info ); |
| 137 | |
| 138 | mDescription.clear(); |
| 139 | } |
| 140 | |
| 141 | void FeatureSet::addFeature( const FeatureType &type, S32 index ) |
| 142 | { |
no test coverage detected