diff --git a/common/str.cpp b/common/str.cpp index 5d051de83ff..416b4d828f5 100644 --- a/common/str.cpp +++ b/common/str.cpp @@ -25,6 +25,8 @@ namespace Common { +const String String::emptyString; + String::String(const char *str, int len) { _refCount = new int(1); if (str && len != 0) { diff --git a/common/str.h b/common/str.h index 9c3949d2e95..af318ee3d09 100644 --- a/common/str.h +++ b/common/str.h @@ -78,6 +78,8 @@ protected: int _capacity; public: + static const String emptyString; + String() : _capacity(0) { _refCount = new int(1); } String(const char *str, int len = -1); String(const ConstString &str);