From 2daf175650cdda7cc8f820b6cb17b1475496e7ac Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Wed, 8 May 2024 23:32:58 +0200 Subject: Add GameControl UI for per device settings --- indra/llcommon/llsd.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'indra/llcommon/llsd.h') diff --git a/indra/llcommon/llsd.h b/indra/llcommon/llsd.h index d2b3548831..7fa193e035 100644 --- a/indra/llcommon/llsd.h +++ b/indra/llcommon/llsd.h @@ -335,6 +335,20 @@ public: { return c ? (*this)[std::string_view(c)] : *this; } + + template + LLSD(const std::map& map, bool exclude_empty = false) + { + assign(emptyMap()); + for (const std::pair& pair : map) + { + LLSD value(pair.second); + if (!exclude_empty || !value.isEmpty()) + { + insert(pair.first, value); + } + } + } //@} /** @name Array Values */ @@ -420,6 +434,7 @@ public: bool isBinary() const { return type() == TypeBinary; } bool isMap() const { return type() == TypeMap; } bool isArray() const { return type() == TypeArray; } + bool isEmpty() const; //@} /** @name Automatic Cast Protection -- cgit v1.2.3 From 0617923ae7f450ece7288f8a73446c45a8ed32db Mon Sep 17 00:00:00 2001 From: leviathan Date: Tue, 3 Sep 2024 15:38:35 -0700 Subject: remove crashy LLSD ctor used by GameControl --- indra/llcommon/llsd.h | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'indra/llcommon/llsd.h') diff --git a/indra/llcommon/llsd.h b/indra/llcommon/llsd.h index 7fa193e035..e018b400cb 100644 --- a/indra/llcommon/llsd.h +++ b/indra/llcommon/llsd.h @@ -335,20 +335,6 @@ public: { return c ? (*this)[std::string_view(c)] : *this; } - - template - LLSD(const std::map& map, bool exclude_empty = false) - { - assign(emptyMap()); - for (const std::pair& pair : map) - { - LLSD value(pair.second); - if (!exclude_empty || !value.isEmpty()) - { - insert(pair.first, value); - } - } - } //@} /** @name Array Values */ -- cgit v1.2.3