diff options
author | David A. Mellis <d.mellis@arduino.cc> | 2010-07-04 16:36:52 +0000 |
---|---|---|
committer | David A. Mellis <d.mellis@arduino.cc> | 2010-07-04 16:36:52 +0000 |
commit | 50bfce889e07711450adace72d5eed785d71ee2e (patch) | |
tree | 01fd33aea600b94d8c4d4c7e44bf107ef0c3e3c5 /cores/arduino/WString.cpp | |
parent | 0c09741c729a9735b30c030b24d6ca67ae864156 (diff) |
Modifying String from new/delete to malloc()/free(). Also #include'ing WString.h from WProgram.h.
Diffstat (limited to 'cores/arduino/WString.cpp')
-rw-r--r-- | cores/arduino/WString.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cores/arduino/WString.cpp b/cores/arduino/WString.cpp index 667a304..91d4f15 100644 --- a/cores/arduino/WString.cpp +++ b/cores/arduino/WString.cpp @@ -113,7 +113,7 @@ const String & String::operator=( const String &rhs ) if ( rhs._length > _length ) { - delete [] _buffer; + free(_buffer); getBuffer( rhs._length ); } _length = rhs._length; @@ -139,7 +139,7 @@ const String & String::operator+=( const String &other ) char *temp = _buffer; getBuffer( _length ); strcpy( _buffer, temp ); - delete [] temp; + free(temp); } strcat( _buffer, other._buffer ); return *this; |