mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-08 03:49:44 -04:00
Delay definition of finalize_inode
(This doesn't make any difference in behaviour.)
This commit is contained in:
parent
f75e7db150
commit
d6b086ed03
@ -333,6 +333,9 @@ void inode_manager_<LoggerPolicy>::order_inodes_by_nilsimsa(
|
||||
index.resize(count);
|
||||
std::iota(index.begin(), index.end(), 0);
|
||||
|
||||
auto empty = std::partition(index.begin(), index.end(),
|
||||
[&](auto i) { return inodes[i]->size() > 0; });
|
||||
|
||||
auto finalize_inode = [&]() {
|
||||
inodes_.push_back(std::move(inodes[index.back()]));
|
||||
index.pop_back();
|
||||
@ -340,9 +343,6 @@ void inode_manager_<LoggerPolicy>::order_inodes_by_nilsimsa(
|
||||
fn(inodes_.back());
|
||||
};
|
||||
|
||||
auto empty = std::partition(index.begin(), index.end(),
|
||||
[&](auto i) { return inodes[i]->size() > 0; });
|
||||
|
||||
if (empty != index.end()) {
|
||||
assert(empty + 1 == index.end());
|
||||
finalize_inode();
|
||||
|
Loading…
x
Reference in New Issue
Block a user