* -1: This CompatSet is missing at least one feature
* described in the other. It may still have more features, though.
*/
- int compare(const CompatSet& other) {
+ int compare(const CompatSet& other) const {
if ((other.compat.mask == compat.mask) &&
(other.ro_compat.mask == ro_compat.mask) &&
(other.incompat.mask == incompat.mask)) return 0;
/* Get the features supported by other CompatSet but not this one,
* as a CompatSet.
*/
- CompatSet unsupported(CompatSet& other) {
+ CompatSet unsupported(const CompatSet& other) const {
CompatSet diff;
uint64_t other_compat =
((other.compat.mask ^ compat.mask) & other.compat.mask);
for (int id = 1; id < 64; ++id) {
uint64_t mask = (uint64_t)1 << id;
if (mask & other_compat) {
- diff.compat.insert( Feature(id, other.compat.names[id]));
+ diff.compat.insert( Feature(id, other.compat.names.at(id)));
}
if (mask & other_ro_compat) {
- diff.ro_compat.insert(Feature(id, other.ro_compat.names[id]));
+ diff.ro_compat.insert(Feature(id, other.ro_compat.names.at(id)));
}
if (mask & other_incompat) {
- diff.incompat.insert( Feature(id, other.incompat.names[id]));
+ diff.incompat.insert( Feature(id, other.incompat.names.at(id)));
}
}
return diff;