[ADT][NFC] Silence some misc-unconventional-assign-operator warnings

This commit is contained in:
Nathan James 2020-10-30 10:57:25 +00:00
parent bd341bafbf
commit 3c3071d5e7
No known key found for this signature in database
GPG Key ID: CC007AFCDA90AA5F
2 changed files with 7 additions and 7 deletions

View File

@ -306,9 +306,9 @@ public:
}
// Extra operators.
const SmallString &operator=(StringRef RHS) {
this->clear();
return *this += RHS;
SmallString &operator=(StringRef RHS) {
this->assign(RHS);
return *this;
}
SmallString &operator+=(StringRef RHS) {

View File

@ -925,7 +925,7 @@ public:
SmallVectorImpl<T>::operator=(RHS);
}
const SmallVector &operator=(const SmallVector &RHS) {
SmallVector &operator=(const SmallVector &RHS) {
SmallVectorImpl<T>::operator=(RHS);
return *this;
}
@ -940,17 +940,17 @@ public:
SmallVectorImpl<T>::operator=(::std::move(RHS));
}
const SmallVector &operator=(SmallVector &&RHS) {
SmallVector &operator=(SmallVector &&RHS) {
SmallVectorImpl<T>::operator=(::std::move(RHS));
return *this;
}
const SmallVector &operator=(SmallVectorImpl<T> &&RHS) {
SmallVector &operator=(SmallVectorImpl<T> &&RHS) {
SmallVectorImpl<T>::operator=(::std::move(RHS));
return *this;
}
const SmallVector &operator=(std::initializer_list<T> IL) {
SmallVector &operator=(std::initializer_list<T> IL) {
this->assign(IL);
return *this;
}