mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-29 13:32:33 +00:00
Change SmallString::operator{=,+=} to take a StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79729 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
953042b392
commit
39db3439bf
@ -41,13 +41,13 @@ public:
|
|||||||
StringRef str() const { return StringRef(this->begin(), this->size()); }
|
StringRef str() const { return StringRef(this->begin(), this->size()); }
|
||||||
|
|
||||||
// Extra operators.
|
// Extra operators.
|
||||||
const SmallString &operator=(const char *RHS) {
|
const SmallString &operator=(StringRef RHS) {
|
||||||
this->clear();
|
this->clear();
|
||||||
return *this += RHS;
|
return *this += RHS;
|
||||||
}
|
}
|
||||||
|
|
||||||
SmallString &operator+=(const char *RHS) {
|
SmallString &operator+=(StringRef RHS) {
|
||||||
this->append(RHS, RHS+strlen(RHS));
|
this->append(RHS.begin(), RHS.end());
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
SmallString &operator+=(char C) {
|
SmallString &operator+=(char C) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user