mirror of
https://github.com/NixOS/nix
synced 2025-06-25 10:41:16 +02:00
Merge pull request #13129 from xokdvium/transparent-comparator
Use transparent comparators for `std::set<std::string>` (NFC)
This commit is contained in:
commit
7808aa2eee
70 changed files with 198 additions and 176 deletions
|
@ -74,7 +74,7 @@ std::pair<Value *, PosIdx> findAlongAttrPath(EvalState & state, const std::strin
|
|||
|
||||
auto a = v->attrs()->get(state.symbols.create(attr));
|
||||
if (!a) {
|
||||
std::set<std::string> attrNames;
|
||||
StringSet attrNames;
|
||||
for (auto & attr : *v->attrs())
|
||||
attrNames.insert(std::string(state.symbols[attr.name]));
|
||||
|
||||
|
|
|
@ -492,7 +492,7 @@ Value & AttrCursor::forceValue()
|
|||
Suggestions AttrCursor::getSuggestionsForAttr(Symbol name)
|
||||
{
|
||||
auto attrNames = getAttrs();
|
||||
std::set<std::string> strAttrNames;
|
||||
StringSet strAttrNames;
|
||||
for (auto & name : attrNames)
|
||||
strAttrNames.insert(std::string(root->state.symbols[name]));
|
||||
|
||||
|
|
|
@ -1446,7 +1446,7 @@ void ExprSelect::eval(EvalState & state, Env & env, Value & v)
|
|||
} else {
|
||||
state.forceAttrs(*vAttrs, pos, "while selecting an attribute");
|
||||
if (!(j = vAttrs->attrs()->get(name))) {
|
||||
std::set<std::string> allAttrNames;
|
||||
StringSet allAttrNames;
|
||||
for (auto & attr : *vAttrs->attrs())
|
||||
allAttrNames.insert(std::string(state.symbols[attr.name]));
|
||||
auto suggestions = Suggestions::bestMatches(allAttrNames, state.symbols[name]);
|
||||
|
@ -1603,7 +1603,7 @@ void EvalState::callFunction(Value & fun, std::span<Value *> args, Value & vRes,
|
|||
user. */
|
||||
for (auto & i : *args[0]->attrs())
|
||||
if (!lambda.formals->has(i.name)) {
|
||||
std::set<std::string> formalNames;
|
||||
StringSet formalNames;
|
||||
for (auto & formal : lambda.formals->formals)
|
||||
formalNames.insert(std::string(symbols[formal.name]));
|
||||
auto suggestions = Suggestions::bestMatches(formalNames, symbols[i.name]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue