| Index: compiled/String.h |
| =================================================================== |
| --- a/compiled/String.h |
| +++ b/compiled/String.h |
| @@ -319,16 +319,29 @@ |
| } |
| ~OwnedString() |
| { |
| if (mBuf) |
| delete[] mBuf; |
| } |
| + void reset(const String& str) |
| + { |
| + *this = str; |
| + } |
| + |
| + void erase() |
| + { |
| + if (mBuf) |
| + delete[] mBuf; |
| + mBuf = nullptr; |
| + mLen = DELETED; |
| + } |
| + |
| OwnedString& operator=(const String& str) |
| { |
| *this = OwnedString(str); |
| return *this; |
| } |
| OwnedString& operator=(const OwnedString& str) |
| { |