aboutsummaryrefslogtreecommitdiff
path: root/butl/filesystem.ixx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-05-15 17:11:27 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2016-05-31 18:42:55 +0300
commit61ef82ec2b2ca396667f92a4e5c6ceb729c42086 (patch)
tree57ca5868483f361a9da28bbfc32f0cc838787b3e /butl/filesystem.ixx
parent79bb0331cb93a736193e733b5ae26d040931a1aa (diff)
Port to MinGW
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
}