summaryrefslogtreecommitdiff
path: root/indra/llxml/llcontrol.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2021-02-01 22:11:44 +0200
committerAndrey Lihatskiy <alihatskiy@productengine.com>2021-02-01 22:11:44 +0200
commitd07f52da62ab4d1a9c8dd2b91f87526f9799ab96 (patch)
tree35fec692ea877804dfc5777d51da7393fc6cec6e /indra/llxml/llcontrol.cpp
parent1fd44923b5e7f89fafe51471b7d83baf0339877d (diff)
parent21565a1f3fe1ae737e2f91c58be2c3cb0b5a2fec (diff)
Merge branch 'master' into DRTVWR-520-apple-notarization
Diffstat (limited to 'indra/llxml/llcontrol.cpp')
-rw-r--r--indra/llxml/llcontrol.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/indra/llxml/llcontrol.cpp b/indra/llxml/llcontrol.cpp
index 80a414d00f..ead8634df4 100644
--- a/indra/llxml/llcontrol.cpp
+++ b/indra/llxml/llcontrol.cpp
@@ -641,6 +641,24 @@ LLSD LLControlGroup::getLLSD(const std::string& name)
return get<LLSD>(name);
}
+LLSD LLControlGroup::asLLSD(bool diffs_only)
+{
+ // Dump all stored values as LLSD
+ LLSD result = LLSD::emptyArray();
+ for (ctrl_name_table_t::iterator iter = mNameTable.begin();
+ iter != mNameTable.end(); iter++)
+ {
+ LLControlVariable *control = iter->second;
+ if (!control || control->isType(TYPE_STRING) || (diffs_only && control->isDefault()))
+ {
+ continue;
+ }
+ const std::string& name = iter->first;
+ result[name] = getLLSD(name);
+ }
+ return result;
+}
+
BOOL LLControlGroup::controlExists(const std::string& name)
{
ctrl_name_table_t::iterator iter = mNameTable.find(name);