aboutsummaryrefslogtreecommitdiff
path: root/butl/filesystem.ixx
diff options
context:
space:
mode:
Diffstat (limited to 'butl/filesystem.ixx')
-rw-r--r--butl/filesystem.ixx29
1 files changed, 6 insertions, 23 deletions
diff --git a/butl/filesystem.ixx b/butl/filesystem.ixx
index c7cd93b..86f654c 100644
--- a/butl/filesystem.ixx
+++ b/butl/filesystem.ixx
@@ -84,21 +84,14 @@ namespace butl
// dir_iterator
//
inline dir_iterator::
- dir_iterator (dir_iterator&& x): e_ (std::move (x.e_)), h_ (x.h_)
+ dir_iterator (dir_iterator&& x)
+ : e_ (std::move (x.e_)), h_ (x.h_)
{
+#ifndef _WIN32
x.h_ = nullptr;
- }
-
- inline dir_iterator& dir_iterator::
- operator= (dir_iterator&& x)
- {
- if (this != &x)
- {
- e_ = std::move (x.e_);
- h_ = x.h_;
- x.h_ = nullptr;
- }
- return *this;
+#else
+ x.h_ = -1;
+#endif
}
inline bool
@@ -112,14 +105,4 @@ namespace butl
{
return !(x == y);
}
-
-#ifndef _WIN32
- inline dir_iterator::
- ~dir_iterator ()
- {
- if (h_ != nullptr)
- ::closedir (h_); // Ignore any errors.
- }
-#else
-#endif
}