Add defaulted move constructors for some types that just got copy constructors
They can all benefit from moving, since they contain std::string and
std::vector. We intended to add these in
https://codereview.webrtc.org/1896953004/, but got compiler errors we
couldn't make sense of, so we skipped them. It turns out that what the
compiler was complaining about was that when we said we'd have a
user-defined move constructor, it stopped generating a copy assignment
operator for us. This CL solves the problem by outfitting the types
with defaulted copy and move assignment operators too.
Review URL: https://codereview.webrtc.org/1899173002
Cr-Original-Commit-Position: refs/heads/master@{#12469}
Cr-Mirrored-From: https://chromium.googlesource.com/external/webrtc
Cr-Mirrored-Commit: 4fb3d2bcca968e8a0f29d8a20f67238f64f40102
diff --git a/base/pathutils.h b/base/pathutils.h
index c155e8c..2a0efa9 100644
--- a/base/pathutils.h
+++ b/base/pathutils.h
@@ -45,9 +45,13 @@
Pathname();
Pathname(const Pathname&);
+ Pathname(Pathname&&);
Pathname(const std::string& pathname);
Pathname(const std::string& folder, const std::string& filename);
+ Pathname& operator=(const Pathname&);
+ Pathname& operator=(Pathname&&);
+
// Set's the default folder delimiter for this Pathname
char folder_delimiter() const { return folder_delimiter_; }
void SetFolderDelimiter(char delimiter);