Skip to content

Commit 4b63ff6

Browse files
committed
Remove some unnecessary hash template arguments
1 parent ad6eb22 commit 4b63ff6

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/libexpr/include/nix/expr/eval.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ private:
431431
* Associate source positions of certain AST nodes with their preceding doc comment, if they have one.
432432
* Grouped by file.
433433
*/
434-
boost::unordered_flat_map<SourcePath, DocCommentMap, std::hash<SourcePath>> positionToDocComment;
434+
boost::unordered_flat_map<SourcePath, DocCommentMap> positionToDocComment;
435435

436436
LookupPath lookupPath;
437437

src/libfetchers/filtering-source-accessor.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ void FilteringSourceAccessor::checkAccess(const CanonPath & path)
5959
struct AllowListSourceAccessorImpl : AllowListSourceAccessor
6060
{
6161
std::set<CanonPath> allowedPrefixes;
62-
boost::unordered_flat_set<CanonPath, std::hash<CanonPath>> allowedPaths;
62+
boost::unordered_flat_set<CanonPath> allowedPaths;
6363

6464
AllowListSourceAccessorImpl(
6565
ref<SourceAccessor> next,
6666
std::set<CanonPath> && allowedPrefixes,
67-
boost::unordered_flat_set<CanonPath, std::hash<CanonPath>> && allowedPaths,
67+
boost::unordered_flat_set<CanonPath> && allowedPaths,
6868
MakeNotAllowedError && makeNotAllowedError)
6969
: AllowListSourceAccessor(SourcePath(next), std::move(makeNotAllowedError))
7070
, allowedPrefixes(std::move(allowedPrefixes))
@@ -86,7 +86,7 @@ struct AllowListSourceAccessorImpl : AllowListSourceAccessor
8686
ref<AllowListSourceAccessor> AllowListSourceAccessor::create(
8787
ref<SourceAccessor> next,
8888
std::set<CanonPath> && allowedPrefixes,
89-
boost::unordered_flat_set<CanonPath, std::hash<CanonPath>> && allowedPaths,
89+
boost::unordered_flat_set<CanonPath> && allowedPaths,
9090
MakeNotAllowedError && makeNotAllowedError)
9191
{
9292
return make_ref<AllowListSourceAccessorImpl>(

src/libfetchers/git-utils.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ struct GitSourceAccessor : SourceAccessor
817817
return toHash(*git_tree_entry_id(entry));
818818
}
819819

820-
boost::unordered_flat_map<CanonPath, TreeEntry, std::hash<CanonPath>> lookupCache;
820+
boost::unordered_flat_map<CanonPath, TreeEntry> lookupCache;
821821

822822
/* Recursively look up 'path' relative to the root. */
823823
git_tree_entry * lookup(State & state, const CanonPath & path)
@@ -1254,7 +1254,7 @@ GitRepoImpl::getAccessor(const WorkdirInfo & wd, bool exportIgnore, MakeNotAllow
12541254
makeFSSourceAccessor(path),
12551255
std::set<CanonPath>{wd.files},
12561256
// Always allow access to the root, but not its children.
1257-
boost::unordered_flat_set<CanonPath, std::hash<CanonPath>>{CanonPath::root},
1257+
boost::unordered_flat_set<CanonPath>{CanonPath::root},
12581258
std::move(makeNotAllowedError))
12591259
.cast<SourceAccessor>();
12601260
if (exportIgnore)

src/libfetchers/include/nix/fetchers/filtering-source-accessor.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ struct AllowListSourceAccessor : public FilteringSourceAccessor
7272
static ref<AllowListSourceAccessor> create(
7373
ref<SourceAccessor> next,
7474
std::set<CanonPath> && allowedPrefixes,
75-
boost::unordered_flat_set<CanonPath, std::hash<CanonPath>> && allowedPaths,
75+
boost::unordered_flat_set<CanonPath> && allowedPaths,
7676
MakeNotAllowedError && makeNotAllowedError);
7777

7878
using FilteringSourceAccessor::FilteringSourceAccessor;

0 commit comments

Comments
 (0)