summaryrefslogtreecommitdiffstats
path: root/Directory.cxx
diff options
context:
space:
mode:
authorKWSys Upstream <kwrobot@kitware.com>2020-03-25 11:47:00 (GMT)
committerBrad King <brad.king@kitware.com>2020-03-25 11:47:51 (GMT)
commit9d3b9ec4ab1a2756c54f2af2b418b8818268c964 (patch)
tree281aabd29c6c157571b517217c7ba1711e5d4e93 /Directory.cxx
parentec33e3600ccda8f6b8c97a70b57715af331b41e6 (diff)
downloadCMake-9d3b9ec4ab1a2756c54f2af2b418b8818268c964.zip
CMake-9d3b9ec4ab1a2756c54f2af2b418b8818268c964.tar.gz
CMake-9d3b9ec4ab1a2756c54f2af2b418b8818268c964.tar.bz2
KWSys 2020-03-25 (4380f1ae)
Code extracted from: https://gitlab.kitware.com/utils/kwsys.git at commit 4380f1ae99f3206938251393e94055a3e4120b2c (master). Upstream Shortlog ----------------- Rolf Eike Beer (6): 25b61c12 Directory: make it move constructible and assignable 8b1a29e1 optimize SystemToolsParseRegistryKey() 420c3b04 call std::string::clear() instead of assigning "" bc9a4256 avoid inefficient usage of std::string::substr() e3c051e2 SystemTools: create directories with the right permissions on Un*x 0085096e avoid std::string::find() to check for prefix
Diffstat (limited to 'Directory.cxx')
-rw-r--r--Directory.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/Directory.cxx b/Directory.cxx
index 1a772b4..d640948 100644
--- a/Directory.cxx
+++ b/Directory.cxx
@@ -35,6 +35,18 @@ Directory::Directory()
this->Internal = new DirectoryInternals;
}
+Directory::Directory(Directory&& other)
+{
+ this->Internal = other.Internal;
+ other.Internal = nullptr;
+}
+
+Directory& Directory::operator=(Directory&& other)
+{
+ std::swap(this->Internal, other.Internal);
+ return *this;
+}
+
Directory::~Directory()
{
delete this->Internal;