From 61ef82ec2b2ca396667f92a4e5c6ceb729c42086 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sun, 15 May 2016 17:11:27 +0300 Subject: Port to MinGW --- butl/filesystem.ixx | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) (limited to 'butl/filesystem.ixx') 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 } -- cgit v1.1