Fixed MemberProxy::set(char[]) not duplicating the string (fixes #1191)

This commit is contained in:
Benoit Blanchon
2020-02-22 12:06:39 +01:00
parent 300323cfd7
commit af0edecddb
5 changed files with 27 additions and 3 deletions

View File

@ -107,8 +107,7 @@ class MemberProxy : public VariantOperators<MemberProxy<TObject, TStringRef> >,
}
template <typename TValue>
FORCE_INLINE typename enable_if<!is_array<TValue>::value, bool>::type set(
const TValue &value) {
FORCE_INLINE bool set(const TValue &value) {
return getOrAddUpstreamMember().set(value);
}
@ -116,7 +115,7 @@ class MemberProxy : public VariantOperators<MemberProxy<TObject, TStringRef> >,
// set(const char*) const
// set(const __FlashStringHelper*) const
template <typename TChar>
FORCE_INLINE bool set(const TChar *value) {
FORCE_INLINE bool set(TChar *value) {
return getOrAddUpstreamMember().set(value);
}