diff --git a/spine-cpp/spine-cpp/include/spine/SpineString.h b/spine-cpp/spine-cpp/include/spine/SpineString.h index b566ffcb3d..7bba40dad3 100644 --- a/spine-cpp/spine-cpp/include/spine/SpineString.h +++ b/spine-cpp/spine-cpp/include/spine/SpineString.h @@ -39,11 +39,11 @@ namespace spine { class SP_API String : public SpineObject { public: - String() : _length(0), _buffer(NULL), _tofree(true) { + String() : _length(0), _buffer(NULL), _tempowner(true) { } String(const char *chars, bool own = false, bool tofree = true) { - _tofree = tofree; + _tempowner = tofree; if (!chars) { _length = 0; _buffer = NULL; @@ -59,7 +59,7 @@ namespace spine { } String(const String &other) { - _tofree = true; + _tempowner = true; if (!other._buffer) { _length = 0; _buffer = NULL; @@ -84,7 +84,7 @@ namespace spine { void own(const String &other) { if (this == &other) return; - if (_buffer && _tofree) { + if (_buffer && _tempowner) { SpineExtension::free(_buffer, __FILE__, __LINE__); } _length = other._length; @@ -95,7 +95,7 @@ namespace spine { void own(const char *chars) { if (_buffer == chars) return; - if (_buffer && _tofree) { + if (_buffer && _tempowner) { SpineExtension::free(_buffer, __FILE__, __LINE__); } @@ -115,7 +115,7 @@ namespace spine { String &operator=(const String &other) { if (this == &other) return *this; - if (_buffer && _tofree) { + if (_buffer && _tempowner) { SpineExtension::free(_buffer, __FILE__, __LINE__); } if (!other._buffer) { @@ -131,7 +131,7 @@ namespace spine { String &operator=(const char *chars) { if (_buffer == chars) return *this; - if (_buffer && _tofree) { + if (_buffer && _tempowner) { SpineExtension::free(_buffer, __FILE__, __LINE__); } if (!chars) { @@ -202,7 +202,7 @@ namespace spine { } ~String() { - if (_buffer && _tofree) { + if (_buffer && _tempowner) { SpineExtension::free(_buffer, __FILE__, __LINE__); } } @@ -210,7 +210,7 @@ namespace spine { private: mutable size_t _length; mutable char *_buffer; - mutable bool _tofree; + mutable bool _tempowner; }; }