summaryrefslogtreecommitdiff
path: root/indra/llcommon/llsd.h
diff options
context:
space:
mode:
authorakleshchev <117672381+akleshchev@users.noreply.github.com>2023-01-10 19:38:44 +0200
committerGitHub <noreply@github.com>2023-01-10 19:38:44 +0200
commitf3cd329b585ef55a66f2a824f010d1a54d67d8d2 (patch)
treec0fa53feca199393e267747832515b062dfe0a24 /indra/llcommon/llsd.h
parent99c040ea9976e90caec9dedd942badc1c43822e7 (diff)
SL-18911 My Land Holdings floater crashes viewer on the Xcode/+Monterey branches (#47)
Revert part of "DRTVWR-575: Address review comments on Xcode 14.1 type tweaks." Crash was reproduced when assigning areastr to llsd, but likely present in other cases of assigning ui strings to llsd (instead of going for lluistring's result directly copy constructor was engaged and either copy or original crashed due to invalid pointers, copy shouldn't have been created).
Diffstat (limited to 'indra/llcommon/llsd.h')
-rw-r--r--indra/llcommon/llsd.h26
1 files changed, 10 insertions, 16 deletions
diff --git a/indra/llcommon/llsd.h b/indra/llcommon/llsd.h
index c1406cf73f..92a1fc58a5 100644
--- a/indra/llcommon/llsd.h
+++ b/indra/llcommon/llsd.h
@@ -30,7 +30,6 @@
#include <map>
#include <string>
#include <vector>
-#include <type_traits>
#include "stdtypes.h"
@@ -216,21 +215,15 @@ public:
void assign(const Date&);
void assign(const URI&);
void assign(const Binary&);
-
- // support assignment from size_t et al.
- template <typename VALUE,
- typename std::enable_if<std::is_integral<VALUE>::value &&
- ! std::is_same<VALUE, Boolean>::value,
- bool>::type = true>
- void assign(VALUE v) { assign(Integer(narrow(v))); }
- // support assignment from F32 et al.
- template <typename VALUE,
- typename std::enable_if<std::is_floating_point<VALUE>::value,
- bool>::type = true>
- void assign(VALUE v) { assign(Real(narrow(v))); }
-
- template <typename VALUE>
- LLSD& operator=(VALUE v) { assign(v); return *this; }
+
+ LLSD& operator=(Boolean v) { assign(v); return *this; }
+ LLSD& operator=(Integer v) { assign(v); return *this; }
+ LLSD& operator=(Real v) { assign(v); return *this; }
+ LLSD& operator=(const String& v) { assign(v); return *this; }
+ LLSD& operator=(const UUID& v) { assign(v); return *this; }
+ LLSD& operator=(const Date& v) { assign(v); return *this; }
+ LLSD& operator=(const URI& v) { assign(v); return *this; }
+ LLSD& operator=(const Binary& v) { assign(v); return *this; }
//@}
/**
@@ -292,6 +285,7 @@ public:
//@{
LLSD(const char*);
void assign(const char*);
+ LLSD& operator=(const char* v) { assign(v); return *this; }
//@}
/** @name Map Values */