From 087b4ad5e512b4f6fae210df0f18be454f607c31 Mon Sep 17 00:00:00 2001
From: Drake Arconis <drake@alchemyviewer.org>
Date: Fri, 29 Jan 2016 01:00:56 -0500
Subject: [PATCH] Add const qualifers in test stubs

---
 indra/newview/tests/llagentaccess_test.cpp      | 2 +-
 indra/newview/tests/lllogininstance_test.cpp    | 8 ++++----
 indra/newview/tests/llsecapi_test.cpp           | 2 +-
 indra/newview/tests/llsechandler_basic_test.cpp | 4 ++--
 indra/newview/tests/llslurl_test.cpp            | 8 ++++----
 indra/newview/tests/lltranslate_test.cpp        | 2 +-
 indra/newview/tests/llviewerhelputil_test.cpp   | 2 +-
 indra/newview/tests/llviewernetwork_test.cpp    | 8 ++++----
 8 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/indra/newview/tests/llagentaccess_test.cpp b/indra/newview/tests/llagentaccess_test.cpp
index 45ce1ba62f..50f9c16db8 100755
--- a/indra/newview/tests/llagentaccess_test.cpp
+++ b/indra/newview/tests/llagentaccess_test.cpp
@@ -60,7 +60,7 @@ void LLControlGroup::setU32(const std::string& name, U32 val)
 	test_preferred_maturity = val;
 }
 
-U32 LLControlGroup::getU32(const std::string& name)
+U32 LLControlGroup::getU32(const std::string& name) const
 {
 	return test_preferred_maturity;
 }
diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp
index bf47f52909..5eda6204c1 100755
--- a/indra/newview/tests/lllogininstance_test.cpp
+++ b/indra/newview/tests/lllogininstance_test.cpp
@@ -181,16 +181,16 @@ LLControlGroup::LLControlGroup(const std::string& name) :
 	LLInstanceTracker<LLControlGroup, std::string>(name){}
 LLControlGroup::~LLControlGroup() {}
 void LLControlGroup::setBOOL(const std::string& name, BOOL val) {}
-BOOL LLControlGroup::getBOOL(const std::string& name) { return FALSE; }
-F32 LLControlGroup::getF32(const std::string& name) { return 0.0f; }
+BOOL LLControlGroup::getBOOL(const std::string& name) const { return FALSE; }
+F32 LLControlGroup::getF32(const std::string& name) const { return 0.0f; }
 U32 LLControlGroup::saveToFile(const std::string& filename, BOOL nondefault_only) { return 1; }
 void LLControlGroup::setString(const std::string& name, const std::string& val) {}
-std::string LLControlGroup::getString(const std::string& name) { return "test_string"; }
+std::string LLControlGroup::getString(const std::string& name) const { return "test_string"; }
 LLControlVariable* LLControlGroup::declareBOOL(const std::string& name, BOOL initial_val, const std::string& comment, LLControlVariable::ePersist persist) { return NULL; }
 LLControlVariable* LLControlGroup::declareString(const std::string& name, const std::string &initial_val, const std::string& comment, LLControlVariable::ePersist persist) { return NULL; }
 
 #include "lluicolortable.h"
-void LLUIColorTable::saveUserSettings(void)const {}
+void LLUIColorTable::saveUserSettings(const bool scrub) const {}
 
 //-----------------------------------------------------------------------------
 #include "../llversioninfo.h"
diff --git a/indra/newview/tests/llsecapi_test.cpp b/indra/newview/tests/llsecapi_test.cpp
index d7e87ed52e..6552886ed0 100755
--- a/indra/newview/tests/llsecapi_test.cpp
+++ b/indra/newview/tests/llsecapi_test.cpp
@@ -44,7 +44,7 @@ LLControlVariable* LLControlGroup::declareString(const std::string& name,
                                    const std::string& comment,
                                    LLControlVariable::ePersist persist) {return NULL;}
 void LLControlGroup::setString(const std::string& name, const std::string& val){}
-std::string LLControlGroup::getString(const std::string& name)
+std::string LLControlGroup::getString(const std::string& name) const
 {
 	return "";
 }
diff --git a/indra/newview/tests/llsechandler_basic_test.cpp b/indra/newview/tests/llsechandler_basic_test.cpp
index 3aa2e8c7bc..7b61e614b2 100755
--- a/indra/newview/tests/llsechandler_basic_test.cpp
+++ b/indra/newview/tests/llsechandler_basic_test.cpp
@@ -76,7 +76,7 @@ LLControlVariable* LLControlGroup::declareString(const std::string& name,
                                    const std::string& comment,
                                    LLControlVariable::ePersist persist) {return NULL;}
 void LLControlGroup::setString(const std::string& name, const std::string& val){}
-std::string LLControlGroup::getString(const std::string& name)
+std::string LLControlGroup::getString(const std::string& name) const
 {
 
 	if (name == "FirstName")
@@ -87,7 +87,7 @@ std::string LLControlGroup::getString(const std::string& name)
 }
 
 // Stub for --no-verify-ssl-cert
-BOOL LLControlGroup::getBOOL(const std::string& name) { return FALSE; }
+BOOL LLControlGroup::getBOOL(const std::string& name) const { return FALSE; }
 
 LLSD LLCredential::getLoginParams()
 {
diff --git a/indra/newview/tests/llslurl_test.cpp b/indra/newview/tests/llslurl_test.cpp
index 76e78b56af..03fa81ce32 100755
--- a/indra/newview/tests/llslurl_test.cpp
+++ b/indra/newview/tests/llslurl_test.cpp
@@ -61,7 +61,7 @@ std::string gCmdLineGridChoice;
 std::string gCmdLineHelperURI;
 std::string gLoginPage;
 std::string gCurrentGrid;
-std::string LLControlGroup::getString(const std::string& name)
+std::string LLControlGroup::getString(const std::string& name) const
 {
 	if (name == "CmdLineGridChoice")
 		return gCmdLineGridChoice;
@@ -74,7 +74,7 @@ std::string LLControlGroup::getString(const std::string& name)
 	return "";
 }
 
-LLSD LLControlGroup::getLLSD(const std::string& name)
+LLSD LLControlGroup::getLLSD(const std::string& name) const
 {
 	if (name == "CmdLineLoginURI")
 	{
@@ -86,9 +86,9 @@ LLSD LLControlGroup::getLLSD(const std::string& name)
 	return LLSD();
 }
 
-LLPointer<LLControlVariable> LLControlGroup::getControl(const std::string& name)
+LLPointer<LLControlVariable> LLControlGroup::getControl(const std::string& name) const
 {
-	ctrl_name_table_t::iterator iter = mNameTable.find(name);
+	ctrl_name_table_t::const_iterator iter = mNameTable.find(name);
 	return iter == mNameTable.end() ? LLPointer<LLControlVariable>() : iter->second;
 }
 
diff --git a/indra/newview/tests/lltranslate_test.cpp b/indra/newview/tests/lltranslate_test.cpp
index bd6fbd038d..73174c19b5 100755
--- a/indra/newview/tests/lltranslate_test.cpp
+++ b/indra/newview/tests/lltranslate_test.cpp
@@ -298,7 +298,7 @@ std::string LLUI::getLanguage() { return "en"; }
 std::string LLTrans::getString(const std::string &xml_desc, const LLStringUtil::format_map_t& args) { return "dummy"; }
 
 LLControlGroup::LLControlGroup(const std::string& name) : LLInstanceTracker<LLControlGroup, std::string>(name) {}
-std::string LLControlGroup::getString(const std::string& name) { return "dummy"; }
+std::string LLControlGroup::getString(const std::string& name) const { return "dummy"; }
 LLControlGroup::~LLControlGroup() {}
 
 LLCurl::Responder::Responder() {}
diff --git a/indra/newview/tests/llviewerhelputil_test.cpp b/indra/newview/tests/llviewerhelputil_test.cpp
index f6456a2839..de0ea43d9c 100755
--- a/indra/newview/tests/llviewerhelputil_test.cpp
+++ b/indra/newview/tests/llviewerhelputil_test.cpp
@@ -54,7 +54,7 @@ LLControlVariable* LLControlGroup::declareString(const std::string& name,
 				   const std::string& comment,
 				   LLControlVariable::ePersist persist) {return NULL;}
 void LLControlGroup::setString(const std::string& name, const std::string& val){}
-std::string LLControlGroup::getString(const std::string& name)
+std::string LLControlGroup::getString(const std::string& name) const
 {
 	if (name == "HelpURLFormat")
 		return gHelpURL;
diff --git a/indra/newview/tests/llviewernetwork_test.cpp b/indra/newview/tests/llviewernetwork_test.cpp
index 5ab4a49276..91d26c6a40 100755
--- a/indra/newview/tests/llviewernetwork_test.cpp
+++ b/indra/newview/tests/llviewernetwork_test.cpp
@@ -59,7 +59,7 @@ std::string gCmdLineGridChoice;
 std::string gCmdLineHelperURI;
 std::string gLoginPage;
 std::string gCurrentGrid;
-std::string LLControlGroup::getString(const std::string& name)
+std::string LLControlGroup::getString(const std::string& name) const
 {
 	if (name == "CmdLineGridChoice")
 		return gCmdLineGridChoice;
@@ -72,7 +72,7 @@ std::string LLControlGroup::getString(const std::string& name)
 	return "";
 }
 
-LLSD LLControlGroup::getLLSD(const std::string& name)
+LLSD LLControlGroup::getLLSD(const std::string& name) const
 {
 	if (name == "CmdLineLoginURI")
 	{
@@ -84,9 +84,9 @@ LLSD LLControlGroup::getLLSD(const std::string& name)
 	return LLSD();
 }
 
-LLPointer<LLControlVariable> LLControlGroup::getControl(const std::string& name)
+LLPointer<LLControlVariable> LLControlGroup::getControl(const std::string& name) const
 {
-	ctrl_name_table_t::iterator iter = mNameTable.find(name);
+	ctrl_name_table_t::const_iterator iter = mNameTable.find(name);
 	return iter == mNameTable.end() ? LLPointer<LLControlVariable>() : iter->second;
 }
 
-- 
GitLab