diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-08-22 06:06:46 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-08-22 06:06:46 +0000 |
commit | df61dfb6aa499180fbfde8a3f77cf1d26f8e2282 (patch) | |
tree | 32b88d26f8a36a09801686169470bdbe8c5d39b5 /include/llvm/ADT | |
parent | 7e5c8aa534fb5b348d5ac1299c819320de6d93a1 (diff) | |
download | external_llvm-df61dfb6aa499180fbfde8a3f77cf1d26f8e2282.zip external_llvm-df61dfb6aa499180fbfde8a3f77cf1d26f8e2282.tar.gz external_llvm-df61dfb6aa499180fbfde8a3f77cf1d26f8e2282.tar.bz2 |
Change SmallString::operator{=,+=} to take a StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79729 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT')
-rw-r--r-- | include/llvm/ADT/SmallString.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/llvm/ADT/SmallString.h b/include/llvm/ADT/SmallString.h index 852c32c..d5856ac 100644 --- a/include/llvm/ADT/SmallString.h +++ b/include/llvm/ADT/SmallString.h @@ -41,13 +41,13 @@ public: StringRef str() const { return StringRef(this->begin(), this->size()); } // Extra operators. - const SmallString &operator=(const char *RHS) { + const SmallString &operator=(StringRef RHS) { this->clear(); return *this += RHS; } - SmallString &operator+=(const char *RHS) { - this->append(RHS, RHS+strlen(RHS)); + SmallString &operator+=(StringRef RHS) { + this->append(RHS.begin(), RHS.end()); return *this; } SmallString &operator+=(char C) { |