Delete unnecessary copy ctors/copy assignment operators

It's the simplest and gives the cleanest semantics.

llvm-svn: 360762
This commit is contained in:
Fangrui Song
2019-05-15 11:23:54 +00:00
parent 9de9b5e950
commit 71a44224e5
30 changed files with 3 additions and 202 deletions

View File

@@ -38,19 +38,6 @@ StringExtractor::StringExtractor(const char *packet_cstr)
m_packet.assign(packet_cstr);
}
// StringExtractor copy constructor
StringExtractor::StringExtractor(const StringExtractor &rhs)
: m_packet(rhs.m_packet), m_index(rhs.m_index) {}
// StringExtractor assignment operator
const StringExtractor &StringExtractor::operator=(const StringExtractor &rhs) {
if (this != &rhs) {
m_packet = rhs.m_packet;
m_index = rhs.m_index;
}
return *this;
}
// Destructor
StringExtractor::~StringExtractor() {}