if (!Best || Distance < BestDistance) {
Best = O;
BestDistance = Distance;
- if (RHS.empty() || !PermitValue)
- NearestString = OptionNames[i];
- else
- NearestString = std::string(OptionNames[i]) + "=" + RHS.str();
+ if (RHS.empty() || !PermitValue)
+ NearestString = OptionNames[i];
+ else
+ NearestString = std::string(OptionNames[i]) + "=" + RHS.str();
}
}
}
static int OptNameCompare(const void *LHS, const void *RHS) {
typedef std::pair<const char *, Option*> pair_ty;
- return strcmp(((pair_ty*)LHS)->first, ((pair_ty*)RHS)->first);
+ return strcmp(((const pair_ty*)LHS)->first, ((const pair_ty*)RHS)->first);
}
// Copy Options into a vector so we can sort them as we like.