Browse Source

dtoolutil: give DSearchPath a defaulted move constructor

rdb 7 years ago
parent
commit
aacafe7be3
2 changed files with 7 additions and 35 deletions
  1. 0 31
      dtool/src/dtoolutil/dSearchPath.cxx
  2. 7 4
      dtool/src/dtoolutil/dSearchPath.h

+ 0 - 31
dtool/src/dtoolutil/dSearchPath.cxx

@@ -116,13 +116,6 @@ write(ostream &out, int indent_level) const {
   }
 }
 
-/**
- * Creates an empty search path.
- */
-DSearchPath::
-DSearchPath() {
-}
-
 /**
  *
  */
@@ -139,30 +132,6 @@ DSearchPath(const Filename &directory) {
   append_directory(directory);
 }
 
-/**
- *
- */
-DSearchPath::
-DSearchPath(const DSearchPath &copy) :
-  _directories(copy._directories)
-{
-}
-
-/**
- *
- */
-void DSearchPath::
-operator = (const DSearchPath &copy) {
-  _directories = copy._directories;
-}
-
-/**
- *
- */
-DSearchPath::
-~DSearchPath() {
-}
-
 /**
  * Removes all the directories from the search list.
  */

+ 7 - 4
dtool/src/dtoolutil/dSearchPath.h

@@ -52,12 +52,15 @@ PUBLISHED:
     Files _files;
   };
 
-  DSearchPath();
+  DSearchPath() = default;
   DSearchPath(const std::string &path, const std::string &separator = std::string());
   DSearchPath(const Filename &directory);
-  DSearchPath(const DSearchPath &copy);
-  void operator = (const DSearchPath &copy);
-  ~DSearchPath();
+  DSearchPath(const DSearchPath &copy) = default;
+  DSearchPath(DSearchPath &&from) = default;
+  ~DSearchPath() = default;
+
+  DSearchPath &operator = (const DSearchPath &copy) = default;
+  DSearchPath &operator = (DSearchPath &&from) = default;
 
   void clear();
   void append_directory(const Filename &directory);