From 7ada3ea719e583101ea0762ed75f0c1b803f08dc Mon Sep 17 00:00:00 2001
From: Cinder <cinder.roxley@phoenixviewer.com>
Date: Wed, 14 May 2014 20:37:25 -0600
Subject: [PATCH] Clean up LLSyntaxIdLSL ctor

---
 indra/newview/llsyntaxid.cpp | 35 ++++++++---------------------------
 indra/newview/llsyntaxid.h   |  5 -----
 2 files changed, 8 insertions(+), 32 deletions(-)

diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp
index 9a0f53978ec..dfbb8c9551a 100644
--- a/indra/newview/llsyntaxid.cpp
+++ b/indra/newview/llsyntaxid.cpp
@@ -103,36 +103,17 @@ void fetchKeywordsFileResponder::cacheFile(const LLSD& content_ref)
 //-----------------------------------------------------------------------------
 // LLSyntaxIdLSL
 //-----------------------------------------------------------------------------
-const std::string CAPABILITY_NAME = "LSLSyntax";
 const std::string FILENAME_DEFAULT = "keywords_lsl_default.xml";
-const std::string SIMULATOR_FEATURE = "LSLSyntaxId";
 
-/**
- * @brief LLSyntaxIdLSL constructor
- */
-LLSyntaxIdLSL::LLSyntaxIdLSL(const std::string& filename, const std::string& sim_feature, const std::string& capability)
+LLSyntaxIdLSL::LLSyntaxIdLSL()
 :	mFilePath(LL_PATH_APP_SETTINGS)
-{
-	mCapabilityName = capability;
-	mFileNameCurrent = filename;
-	mFileNameDefault = filename;
-	mSimulatorFeature = sim_feature;
-	mSyntaxIdCurrent = LLUUID();
-}
-
-LLSyntaxIdLSL::LLSyntaxIdLSL() :
-	mFilePath(LL_PATH_APP_SETTINGS)
-{
-	mCapabilityName = CAPABILITY_NAME;
-	mFileNameCurrent = FILENAME_DEFAULT;
-	mFileNameDefault = FILENAME_DEFAULT;
-	mSimulatorFeature = SIMULATOR_FEATURE;
-	mSyntaxIdCurrent = LLUUID();
-}
+,	mFileNameCurrent(FILENAME_DEFAULT)
+,	mSyntaxIdCurrent(LLUUID())
+{}
 
 std::string LLSyntaxIdLSL::buildFileNameNew()
 {
-	mFileNameNew = mSyntaxIdNew.isNull() ? mFileNameDefault : "keywords_lsl_" + mSyntaxIdNew.asString() + ".llsd.xml";
+	mFileNameNew = mSyntaxIdNew.isNull() ? FILENAME_DEFAULT : "keywords_lsl_" + mSyntaxIdNew.asString() + ".llsd.xml";
 	return mFileNameNew;
 }
 
@@ -165,11 +146,11 @@ bool LLSyntaxIdLSL::checkSyntaxIdChanged()
 			region->getSimulatorFeatures(simFeatures);
 
 			// Does the sim have the required feature
-			if (simFeatures.has(mSimulatorFeature))
+			if (simFeatures.has("LSLSyntaxId"))
 			{
 				// get and check the hash
-				mSyntaxIdNew = simFeatures[mSimulatorFeature].asUUID();
-				mCapabilityURL = region->getCapability(mCapabilityName);
+				mSyntaxIdNew = simFeatures["LSLSyntaxId"].asUUID();
+				mCapabilityURL = region->getCapability("LSLSyntax");
 				if (mSyntaxIdCurrent != mSyntaxIdNew)
 				{
 					LL_DEBUGS("SyntaxLSL") << "Region has LSLSyntaxId capability, and the new hash is '" << mSyntaxIdNew.asString() << "'" << LL_ENDL;
diff --git a/indra/newview/llsyntaxid.h b/indra/newview/llsyntaxid.h
index d803a091671..0f347a6ce30 100644
--- a/indra/newview/llsyntaxid.h
+++ b/indra/newview/llsyntaxid.h
@@ -42,7 +42,6 @@ friend class fetchKeywordsFileResponder;
 
 public:
 	LLSyntaxIdLSL();
-	LLSyntaxIdLSL(const std::string& filename, const std::string& sim_feature, const std::string& capability);
 
 	bool			checkSyntaxIdChanged();
 	bool			fetching();
@@ -70,7 +69,6 @@ friend class fetchKeywordsFileResponder;
 	void			loadKeywordsIntoLLSD();
 	void			setSyntaxId(LLUUID SyntaxId) { mSyntaxIdCurrent = SyntaxId; }
 	void			setFileNameCurrent(const std::string& name) { mFileNameCurrent = name; }
-	void			setFileNameDefault(const std::string& name) { mFileNameDefault = name; }
 	void			setFileNameNew(const std::string name) { mFileNameNew = name; }
 	
 private:
@@ -81,14 +79,11 @@ friend class fetchKeywordsFileResponder;
 	bool		mVersionChanged;
 	file_fetched_signal_t	mFileFetchedSignal;
 	
-	std::string		mCapabilityName;
 	std::string		mCapabilityURL;
 	std::string		mFileNameCurrent;
-	std::string		mFileNameDefault;
 	std::string		mFileNameNew;
 	ELLPath			mFilePath;
 	std::string		mFullFileSpec;
-	std::string		mSimulatorFeature;
 	LLUUID			mSyntaxIdCurrent;
 	LLUUID			mSyntaxIdNew;
 };
-- 
GitLab