mirror of
https://github.com/NixOS/nix.git
synced 2025-11-09 12:06:01 +01:00
Remove some unnecessary hash template arguments
This commit is contained in:
parent
ad6eb22368
commit
4b63ff63a4
4 changed files with 7 additions and 7 deletions
|
|
@ -431,7 +431,7 @@ private:
|
||||||
* Associate source positions of certain AST nodes with their preceding doc comment, if they have one.
|
* Associate source positions of certain AST nodes with their preceding doc comment, if they have one.
|
||||||
* Grouped by file.
|
* Grouped by file.
|
||||||
*/
|
*/
|
||||||
boost::unordered_flat_map<SourcePath, DocCommentMap, std::hash<SourcePath>> positionToDocComment;
|
boost::unordered_flat_map<SourcePath, DocCommentMap> positionToDocComment;
|
||||||
|
|
||||||
LookupPath lookupPath;
|
LookupPath lookupPath;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -59,12 +59,12 @@ void FilteringSourceAccessor::checkAccess(const CanonPath & path)
|
||||||
struct AllowListSourceAccessorImpl : AllowListSourceAccessor
|
struct AllowListSourceAccessorImpl : AllowListSourceAccessor
|
||||||
{
|
{
|
||||||
std::set<CanonPath> allowedPrefixes;
|
std::set<CanonPath> allowedPrefixes;
|
||||||
boost::unordered_flat_set<CanonPath, std::hash<CanonPath>> allowedPaths;
|
boost::unordered_flat_set<CanonPath> allowedPaths;
|
||||||
|
|
||||||
AllowListSourceAccessorImpl(
|
AllowListSourceAccessorImpl(
|
||||||
ref<SourceAccessor> next,
|
ref<SourceAccessor> next,
|
||||||
std::set<CanonPath> && allowedPrefixes,
|
std::set<CanonPath> && allowedPrefixes,
|
||||||
boost::unordered_flat_set<CanonPath, std::hash<CanonPath>> && allowedPaths,
|
boost::unordered_flat_set<CanonPath> && allowedPaths,
|
||||||
MakeNotAllowedError && makeNotAllowedError)
|
MakeNotAllowedError && makeNotAllowedError)
|
||||||
: AllowListSourceAccessor(SourcePath(next), std::move(makeNotAllowedError))
|
: AllowListSourceAccessor(SourcePath(next), std::move(makeNotAllowedError))
|
||||||
, allowedPrefixes(std::move(allowedPrefixes))
|
, allowedPrefixes(std::move(allowedPrefixes))
|
||||||
|
|
@ -86,7 +86,7 @@ struct AllowListSourceAccessorImpl : AllowListSourceAccessor
|
||||||
ref<AllowListSourceAccessor> AllowListSourceAccessor::create(
|
ref<AllowListSourceAccessor> AllowListSourceAccessor::create(
|
||||||
ref<SourceAccessor> next,
|
ref<SourceAccessor> next,
|
||||||
std::set<CanonPath> && allowedPrefixes,
|
std::set<CanonPath> && allowedPrefixes,
|
||||||
boost::unordered_flat_set<CanonPath, std::hash<CanonPath>> && allowedPaths,
|
boost::unordered_flat_set<CanonPath> && allowedPaths,
|
||||||
MakeNotAllowedError && makeNotAllowedError)
|
MakeNotAllowedError && makeNotAllowedError)
|
||||||
{
|
{
|
||||||
return make_ref<AllowListSourceAccessorImpl>(
|
return make_ref<AllowListSourceAccessorImpl>(
|
||||||
|
|
|
||||||
|
|
@ -817,7 +817,7 @@ struct GitSourceAccessor : SourceAccessor
|
||||||
return toHash(*git_tree_entry_id(entry));
|
return toHash(*git_tree_entry_id(entry));
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::unordered_flat_map<CanonPath, TreeEntry, std::hash<CanonPath>> lookupCache;
|
boost::unordered_flat_map<CanonPath, TreeEntry> lookupCache;
|
||||||
|
|
||||||
/* Recursively look up 'path' relative to the root. */
|
/* Recursively look up 'path' relative to the root. */
|
||||||
git_tree_entry * lookup(State & state, const CanonPath & path)
|
git_tree_entry * lookup(State & state, const CanonPath & path)
|
||||||
|
|
@ -1254,7 +1254,7 @@ GitRepoImpl::getAccessor(const WorkdirInfo & wd, bool exportIgnore, MakeNotAllow
|
||||||
makeFSSourceAccessor(path),
|
makeFSSourceAccessor(path),
|
||||||
std::set<CanonPath>{wd.files},
|
std::set<CanonPath>{wd.files},
|
||||||
// Always allow access to the root, but not its children.
|
// Always allow access to the root, but not its children.
|
||||||
boost::unordered_flat_set<CanonPath, std::hash<CanonPath>>{CanonPath::root},
|
boost::unordered_flat_set<CanonPath>{CanonPath::root},
|
||||||
std::move(makeNotAllowedError))
|
std::move(makeNotAllowedError))
|
||||||
.cast<SourceAccessor>();
|
.cast<SourceAccessor>();
|
||||||
if (exportIgnore)
|
if (exportIgnore)
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ struct AllowListSourceAccessor : public FilteringSourceAccessor
|
||||||
static ref<AllowListSourceAccessor> create(
|
static ref<AllowListSourceAccessor> create(
|
||||||
ref<SourceAccessor> next,
|
ref<SourceAccessor> next,
|
||||||
std::set<CanonPath> && allowedPrefixes,
|
std::set<CanonPath> && allowedPrefixes,
|
||||||
boost::unordered_flat_set<CanonPath, std::hash<CanonPath>> && allowedPaths,
|
boost::unordered_flat_set<CanonPath> && allowedPaths,
|
||||||
MakeNotAllowedError && makeNotAllowedError);
|
MakeNotAllowedError && makeNotAllowedError);
|
||||||
|
|
||||||
using FilteringSourceAccessor::FilteringSourceAccessor;
|
using FilteringSourceAccessor::FilteringSourceAccessor;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue