From d9bd098e68fdd7b3e2e7551231ac3ef84b55d153 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@bred.dog>
Date: Sun, 26 Jul 2020 11:31:18 -0400
Subject: [PATCH] Fix incorrect usage of LLSD::emptyMap and LLSD::emptyArray

---
 indra/llcommon/llerror.cpp              | 2 +-
 indra/llui/llmultislider.cpp            | 2 +-
 indra/llwindow/lldxhardware.cpp         | 2 +-
 indra/newview/llenvironment.cpp         | 2 +-
 indra/newview/llfloatermodelpreview.cpp | 2 +-
 indra/newview/llimprocessing.cpp        | 2 +-
 indra/newview/llpanelexperiencelog.cpp  | 2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp
index 51abb6dc009..3ffb05f858a 100644
--- a/indra/llcommon/llerror.cpp
+++ b/indra/llcommon/llerror.cpp
@@ -901,7 +901,7 @@ namespace LLError
             for (a = sets.beginArray(), end = sets.endArray(); a != end; ++a)
             {
                 const LLSD& entry = *a;
-                if (entry.isMap() && !entry.emptyMap())
+                if (entry.isMap() && entry.size() != 0)
                 {
                     ELevel level = decodeLevel(entry["level"]);
 
diff --git a/indra/llui/llmultislider.cpp b/indra/llui/llmultislider.cpp
index acfe4a0cba7..3cc121aa6a7 100644
--- a/indra/llui/llmultislider.cpp
+++ b/indra/llui/llmultislider.cpp
@@ -92,7 +92,7 @@ LLMultiSlider::LLMultiSlider(const LLMultiSlider::Params& p)
 	mMouseDownSignal(NULL),
 	mMouseUpSignal(NULL)
 {
-	mValue.emptyMap();
+	mValue = LLSD::emptyMap();
 	mCurSlider = LLStringUtil::null;
 
 	if (mOrientation == HORIZONTAL)
diff --git a/indra/llwindow/lldxhardware.cpp b/indra/llwindow/lldxhardware.cpp
index 116a470e9b2..66725a7e857 100644
--- a/indra/llwindow/lldxhardware.cpp
+++ b/indra/llwindow/lldxhardware.cpp
@@ -589,7 +589,7 @@ LLSD LLDXHardware::getDisplayInfo()
     }
 
 LCleanup:
-    if (ret.emptyMap())
+    if (ret.size() == 0)
     {
         LL_INFOS() << "Failed to get data, cleaning up" << LL_ENDL;
     }
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp
index 555836ed34a..a0af107689b 100644
--- a/indra/newview/llenvironment.cpp
+++ b/indra/newview/llenvironment.cpp
@@ -2872,7 +2872,7 @@ bool LLEnvironment::loadFromSettings()
         LL_INFOS("ENVIRONMENT") << "Unable to open previous session environment file " << user_filepath << LL_ENDL;
     }
 
-    if (!env_data.isMap() || env_data.emptyMap())
+    if (!env_data.isMap() || env_data.size() == 0)
     {
         LL_DEBUGS("ENVIRONMENT") << "Empty map loaded from: " << user_filepath << LL_ENDL;
         return false;
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 7dc45784170..7082343e3ca 100644
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -4472,7 +4472,7 @@ void LLFloaterModelPreview::toggleCalculateButton(bool visible)
 		childSetTextArg("download_weight", "[ST]", tbd);
 		childSetTextArg("server_weight", "[SIM]", tbd);
 		childSetTextArg("physics_weight", "[PH]", tbd);
-		if (!mModelPhysicsFee.isMap() || mModelPhysicsFee.emptyMap())
+		if (!mModelPhysicsFee.isMap() || mModelPhysicsFee.size() == 0)
 		{
 			childSetTextArg("upload_fee", "[FEE]", tbd);
 		}
diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp
index a84c891a56f..e09e82400e2 100644
--- a/indra/newview/llimprocessing.cpp
+++ b/indra/newview/llimprocessing.cpp
@@ -1729,7 +1729,7 @@ void LLIMProcessing::requestOfflineMessagesCoro(std::string url)
         return;
     }
 
-    if (messages.emptyArray())
+    if (messages.size() == 0)
     {
         // Nothing to process
         return;
diff --git a/indra/newview/llpanelexperiencelog.cpp b/indra/newview/llpanelexperiencelog.cpp
index 44b4728df77..0f2d1705a09 100644
--- a/indra/newview/llpanelexperiencelog.cpp
+++ b/indra/newview/llpanelexperiencelog.cpp
@@ -112,7 +112,7 @@ void LLPanelExperienceLog::refresh()
 	int items = 0;
 	bool moreItems = false;
 	LLSD events_to_save = events;
-	if (!events.emptyMap())
+	if (events.size() != 0)
 	{
 		LLSD::map_const_iterator day = events.endMap();
 		do
-- 
GitLab