summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorCinder <cinder.roxley@phoenixviewer.com>2014-05-14 20:37:25 -0600
committerCinder <cinder.roxley@phoenixviewer.com>2014-05-14 20:37:25 -0600
commit7ada3ea719e583101ea0762ed75f0c1b803f08dc (patch)
tree535f9ea0bb250fb84006897b3127d2075ed5b92e /indra
parente776b600b1a76fcbe316041fc6fa8e885464daee (diff)
Clean up LLSyntaxIdLSL ctor
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llsyntaxid.cpp35
-rw-r--r--indra/newview/llsyntaxid.h5
2 files changed, 8 insertions, 32 deletions
diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp
index 9a0f53978e..dfbb8c9551 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 d803a09167..0f347a6ce3 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 @@ protected:
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 @@ private:
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;
};