diff --git a/rjp++/include/object.hpp b/rjp++/include/object.hpp index 48b4d4c..19ec821 100644 --- a/rjp++/include/object.hpp +++ b/rjp++/include/object.hpp @@ -138,7 +138,7 @@ namespace rjp{ private: RJP_value* add_member_impl(const rexy::string_base& key); - RJP_value* add_member_impl(rexy::string_base&& key); + RJP_value* add_member_impl(string&& key); }; } diff --git a/rjp++/src/object.cpp b/rjp++/src/object.cpp index 34388f7..0730425 100644 --- a/rjp++/src/object.cpp +++ b/rjp++/src/object.cpp @@ -130,7 +130,7 @@ namespace rjp{ RJP_value* object::add_member_impl(const rexy::string_base& key){ return rjp_new_member(m_value, key.get(), key.length()); } - RJP_value* object::add_member_impl(rexy::string_base&& key){ + RJP_value* object::add_member_impl(string&& key){ auto length = key.length(); return rjp_new_member_steal_key(m_value, key.release(), length); } diff --git a/rjp++/src/string.cpp b/rjp++/src/string.cpp index 79bac01..a2d9afb 100644 --- a/rjp++/src/string.cpp +++ b/rjp++/src/string.cpp @@ -40,9 +40,9 @@ namespace rjp{ return *this; reset(); RJP_string* str = rjp_get_string(r); - m_data = std::exchange(str->value, nullptr); - m_length = str->length; - m_cap = str->length; + set_long_ptr(std::exchange(str->value, nullptr)); + set_long_length(str->length); + set_long_capacity(str->length); str->length = 0; return *this; }