mirror of
https://github.com/ceph/ceph
synced 2025-03-11 02:39:05 +00:00
Merge pull request #47672 from Matan-B/wip-matanb-buffer-next
include/buffer: clear_and_dispose() fix implicitly-declared operator= usage Reviewed-by: Patrick Donnelly <pdonnell@redhat.com> Reviewed-by: Kefu Chai <tchaikov@gmail.com>
This commit is contained in:
commit
a1d8b793e1
@ -594,13 +594,13 @@ struct error_code;
|
||||
}
|
||||
}
|
||||
void clear_and_dispose() {
|
||||
for (auto it = begin(); it != end(); /* nop */) {
|
||||
auto& node = *it;
|
||||
it = it->next;
|
||||
ptr_node::disposer()(&node);
|
||||
}
|
||||
_root.next = &_root;
|
||||
_tail = &_root;
|
||||
ptr_node::disposer dispose;
|
||||
for (auto it = begin(), e = end(); it != e; /* nop */) {
|
||||
auto& node = *it++;
|
||||
dispose(&node);
|
||||
}
|
||||
_tail = &_root;
|
||||
_root.next = _tail;
|
||||
}
|
||||
iterator erase_after_and_dispose(iterator it) {
|
||||
auto* to_dispose = &*std::next(it);
|
||||
|
Loading…
Reference in New Issue
Block a user