From c033060c166fc861bbaf7b33a9ae38b62da4b0a8 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Mon, 20 Apr 2020 19:49:39 +0200 Subject: [PATCH] Handle ConstString empty pointer better. --- src/ConstString.cpp | 6 ++++++ src/__ConstStringCore.hpp | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 src/ConstString.cpp diff --git a/src/ConstString.cpp b/src/ConstString.cpp new file mode 100644 index 0000000..0f81ad9 --- /dev/null +++ b/src/ConstString.cpp @@ -0,0 +1,6 @@ +#include "ConstString.hpp" + +Arbutils::__ConstStringCharHolder* Arbutils::CaseInsensitiveConstString::_emptyString = + new Arbutils::__ConstStringCharHolder("", 0); + +Arbutils::__ConstStringCharHolder* Arbutils::ConstString::_emptyString = new Arbutils::__ConstStringCharHolder("", 0); \ No newline at end of file diff --git a/src/__ConstStringCore.hpp b/src/__ConstStringCore.hpp index ed1856b..74b0e96 100644 --- a/src/__ConstStringCore.hpp +++ b/src/__ConstStringCore.hpp @@ -69,7 +69,6 @@ inline static constexpr uint32_t GetHash(const char* val) { return Hash(val); } \ inline static STDSTRINGCONSTEXPR uint32_t GetHash(const std::string& val) { return Hash(val.c_str()); } \ }; \ - Arbutils::__ConstStringCharHolder* Arbutils::name::_emptyString = new __ConstStringCharHolder("", 0); \ \ class name##_Literal { \ private: \