From 15d8f355072f2184f046a7aafb1b5c606fe97880 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 14 May 2014 16:43:13 -0400 Subject: clean up the constructor for LLSyntaxIdLSL --- indra/newview/llsyntaxid.cpp | 36 +++++++++++++++++------------------- indra/newview/llsyntaxid.h | 5 ++++- 2 files changed, 21 insertions(+), 20 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp index 9a0f53978e..7551c1a442 100644 --- a/indra/newview/llsyntaxid.cpp +++ b/indra/newview/llsyntaxid.cpp @@ -103,31 +103,29 @@ 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"; +const std::string LLSyntaxIdLSL::CAPABILITY_NAME = "LSLSyntax"; +const std::string LLSyntaxIdLSL::FILENAME_DEFAULT = "keywords_lsl_default.xml"; +const std::string LLSyntaxIdLSL::SIMULATOR_FEATURE = "LSLSyntaxId"; /** * @brief LLSyntaxIdLSL constructor */ -LLSyntaxIdLSL::LLSyntaxIdLSL(const std::string& filename, const std::string& sim_feature, const std::string& capability) -: mFilePath(LL_PATH_APP_SETTINGS) -{ - mCapabilityName = capability; - mFileNameCurrent = filename; - mFileNameDefault = filename; - mSimulatorFeature = sim_feature; - mSyntaxIdCurrent = LLUUID(); -} - LLSyntaxIdLSL::LLSyntaxIdLSL() : - mFilePath(LL_PATH_APP_SETTINGS) + mInitialized(false), + mKeywordsXml(LLSD()), + mLoaded(false), + mLoadFailed(false), + mVersionChanged(false), + mCapabilityName(CAPABILITY_NAME), + mCapabilityURL(""), + mFileNameCurrent(FILENAME_DEFAULT), + mFileNameDefault(FILENAME_DEFAULT), + mFileNameNew(""), + mFilePath(LL_PATH_APP_SETTINGS), + mSimulatorFeature(SIMULATOR_FEATURE), + mSyntaxIdCurrent(LLUUID()), + mSyntaxIdNew(LLUUID()) { - mCapabilityName = CAPABILITY_NAME; - mFileNameCurrent = FILENAME_DEFAULT; - mFileNameDefault = FILENAME_DEFAULT; - mSimulatorFeature = SIMULATOR_FEATURE; - mSyntaxIdCurrent = LLUUID(); } std::string LLSyntaxIdLSL::buildFileNameNew() diff --git a/indra/newview/llsyntaxid.h b/indra/newview/llsyntaxid.h index d803a09167..aa69209ca9 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(); @@ -74,6 +73,10 @@ protected: void setFileNameNew(const std::string name) { mFileNameNew = name; } private: + static const std::string CAPABILITY_NAME; + static const std::string FILENAME_DEFAULT; + static const std::string SIMULATOR_FEATURE; + bool mInitialized; LLSD mKeywordsXml; bool mLoaded; -- cgit v1.2.3