Fixes for ConstString
continuous-integration/drone/push Build is passing

This commit is contained in:
Deukhoofd committed 2020-05-02 15:30:25 +02:00
1 parent 517f95bfc5
commit 84b08f66e5
3 files changed
+11 -15

No files matched your search

+2 -2
View File
@@ -1,4 +1,4 @@
#include "ConstString.hpp"
Arbutils::__ConstStringCharHolder* Arbutils::CaseInsensitiveConstString::__emptyString = nullptr;
Arbutils::__ConstStringCharHolder* Arbutils::ConstString::__emptyString = nullptr;
Arbutils::__ConstStringCharHolder* Arbutils::CaseInsensitiveConstString::__emptyString = new __ConstStringCharHolder("", 0);;
Arbutils::__ConstStringCharHolder* Arbutils::ConstString::__emptyString = new __ConstStringCharHolder("", 0);;
+1 -5
View File
@@ -17,11 +17,7 @@
hashFunction; \
\
static __ConstStringCharHolder* __emptyString; \
static inline __ConstStringCharHolder* GetEmptyString() { \
if (__emptyString == nullptr) \
__emptyString = new __ConstStringCharHolder("", 0); \
return __emptyString; \
} \
static inline __ConstStringCharHolder* GetEmptyString() { return __emptyString; } \
\
inline static int constexpr Length(const char* str) { return *str ? 1 + Length(str + 1) : 0; } \
inline __ConstStringCharHolder* CloneHolder() const noexcept { \