mirror of
https://github.com/Zygo/bees.git
synced 2025-05-17 21:35:45 +02:00
crawl: use custom order instead of (ab)using BeesFileRange::operator<
This makes the code clearer and keeps changes to BeesFileRange ordering isolated. Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
parent
f8c27f5c6a
commit
c3effe0a20
@ -293,7 +293,11 @@ BeesRoots::crawl_roots()
|
||||
auto this_crawl = i.second;
|
||||
auto this_range = this_crawl->peek_front();
|
||||
if (this_range) {
|
||||
if (!first_range || this_range < first_range) {
|
||||
// Use custom ordering here to avoid abusing BeesFileRange::operator<().
|
||||
if (!first_range ||
|
||||
make_tuple(this_range.fid().ino(), this_range.begin(), this_range.fid().root()) <
|
||||
make_tuple(first_range.fid().ino(), first_range.begin(), first_range.fid().root())
|
||||
) {
|
||||
first_crawl = this_crawl;
|
||||
first_range = this_range;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user