diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2023-08-21 14:58:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-21 14:58:00 +0200 |
commit | 3fcdea4ca0f362d21637002918b49cd41358e8e2 (patch) | |
tree | 8894362a958628af3eb40e1a227092764b04f7bb /src | |
parent | 10afcf06aa2607bf088f7f08989f42c1fa2689a2 (diff) | |
parent | fe71faa920ef34b67f56232decc22cf5706a00dd (diff) |
Merge pull request #8836 from obsidiansystems/rm-addToSearchPath
Delete `EvalState::addToSearchPath`
Diffstat (limited to 'src')
-rw-r--r-- | src/libexpr/eval.cc | 4 | ||||
-rw-r--r-- | src/libexpr/eval.hh | 2 | ||||
-rw-r--r-- | src/libexpr/parser.y | 6 |
3 files changed, 2 insertions, 10 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc index 7e839dbe7..6d445fd96 100644 --- a/src/libexpr/eval.cc +++ b/src/libexpr/eval.cc @@ -527,9 +527,9 @@ EvalState::EvalState( /* Initialise the Nix expression search path. */ if (!evalSettings.pureEval) { for (auto & i : _searchPath.elements) - addToSearchPath(SearchPath::Elem {i}); + searchPath.elements.emplace_back(SearchPath::Elem {i}); for (auto & i : evalSettings.nixPath.get()) - addToSearchPath(SearchPath::Elem::parse(i)); + searchPath.elements.emplace_back(SearchPath::Elem::parse(i)); } if (evalSettings.restrictEval || evalSettings.pureEval) { diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh index 0c3eb6505..fa8fa462b 100644 --- a/src/libexpr/eval.hh +++ b/src/libexpr/eval.hh @@ -341,8 +341,6 @@ public: std::shared_ptr<Store> buildStore = nullptr); ~EvalState(); - void addToSearchPath(SearchPath::Elem && elem); - SearchPath getSearchPath() { return searchPath; } /** diff --git a/src/libexpr/parser.y b/src/libexpr/parser.y index 201370b90..792f51fde 100644 --- a/src/libexpr/parser.y +++ b/src/libexpr/parser.y @@ -736,12 +736,6 @@ Expr * EvalState::parseStdin() } -void EvalState::addToSearchPath(SearchPath::Elem && elem) -{ - searchPath.elements.emplace_back(std::move(elem)); -} - - SourcePath EvalState::findFile(const std::string_view path) { return findFile(searchPath, path); |