Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/llfio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2021-06-16 18:56:33 +0300
committerNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2021-06-16 18:56:33 +0300
commit4def09a17a65ee4b4ecbd6e5815be5493edc06f7 (patch)
treefab2f7f1793dbb939f1dd8b53d9c7bf09932b7cd
parentf6dd9743a94462472a4a06638b844046b5c71d8d (diff)
Fix traversal_summary not being copyable nor moveable, which was never intended.
-rw-r--r--include/llfio/v2.0/algorithm/summarize.hpp59
1 files changed, 59 insertions, 0 deletions
diff --git a/include/llfio/v2.0/algorithm/summarize.hpp b/include/llfio/v2.0/algorithm/summarize.hpp
index df797dad..467d1bde 100644
--- a/include/llfio/v2.0/algorithm/summarize.hpp
+++ b/include/llfio/v2.0/algorithm/summarize.hpp
@@ -59,6 +59,65 @@ namespace algorithm
handle::extent_type directory_blocks{0}; //!< The sum of directory allocated blocks.
size_t max_depth{0}; //!< The maximum depth of the hierarchy
+ traversal_summary() {}
+ traversal_summary(const traversal_summary &o)
+ : directory_opens_failed(o.directory_opens_failed)
+ , want(o.want)
+ , devs(o.devs)
+ , types(o.types)
+ , size(o.size)
+ , allocated(o.allocated)
+ , file_blocks(o.file_blocks)
+ , directory_blocks(o.directory_blocks)
+ , max_depth(o.max_depth)
+ {
+ assert(!is_lockable_locked(o._lock));
+ }
+ traversal_summary(traversal_summary &&o) noexcept
+ : directory_opens_failed(o.directory_opens_failed)
+ , want(o.want)
+ , devs(std::move(o.devs))
+ , types(std::move(o.types))
+ , size(o.size)
+ , allocated(o.allocated)
+ , file_blocks(o.file_blocks)
+ , directory_blocks(o.directory_blocks)
+ , max_depth(o.max_depth)
+ {
+ assert(!is_lockable_locked(o._lock));
+ }
+ traversal_summary &operator=(const traversal_summary &o)
+ {
+ if(this != &o)
+ {
+ directory_opens_failed = o.directory_opens_failed;
+ want = o.want;
+ devs = o.devs;
+ types = o.types;
+ size = o.size;
+ allocated = o.allocated;
+ file_blocks = o.file_blocks;
+ directory_blocks = o.directory_blocks;
+ max_depth = o.max_depth;
+ }
+ return *this;
+ }
+ traversal_summary &operator=(traversal_summary &&o) noexcept
+ {
+ if(this != &o)
+ {
+ directory_opens_failed = o.directory_opens_failed;
+ want = o.want;
+ devs = std::move(o.devs);
+ types = std::move(o.types);
+ size = o.size;
+ allocated = o.allocated;
+ file_blocks = o.file_blocks;
+ directory_blocks = o.directory_blocks;
+ max_depth = o.max_depth;
+ }
+ return *this;
+ }
//! Adds another summary to this
traversal_summary &operator+=(const traversal_summary &o)
{