cleanup whitespaces
svn-id: r11219
This commit is contained in:
parent
bd972c97e5
commit
b5a7ef0822
15 changed files with 37 additions and 47 deletions
|
@ -203,8 +203,8 @@ void String::ensureCapacity(int new_len, bool keep_old) {
|
|||
if (new_len <= _capacity && *_refCount == 1)
|
||||
return;
|
||||
|
||||
int newCapacity = (new_len <= _capacity) ? _capacity : new_len + 32;
|
||||
char *newStr = (char *)calloc(1, newCapacity+1);
|
||||
int newCapacity = (new_len <= _capacity) ? _capacity : new_len + 32;
|
||||
char *newStr = (char *)calloc(1, newCapacity+1);
|
||||
|
||||
if (keep_old && _str)
|
||||
memcpy(newStr, _str, _len + 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue