summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraham Linden graham@lindenlab.com <Graham Linden graham@lindenlab.com>2018-02-28 21:57:19 +0000
committerGraham Linden graham@lindenlab.com <Graham Linden graham@lindenlab.com>2018-02-28 21:57:19 +0000
commitccdf55f4abdbe4ef0944f8c28216d78e259e3cf0 (patch)
tree67276eddc55fd54ab4e523716d0b7033ab9cbfad
parentaba5777d747d67db43e03772d30cb50d18d1a5d5 (diff)
parent5621fa48537100d70e8d06b00b6c2577f5c11140 (diff)
Merge
-rw-r--r--indra/llinventory/llsettingsbase.cpp2
-rw-r--r--indra/llinventory/llsettingsdaycycle.h10
-rw-r--r--indra/llinventory/llsettingssky.h12
-rw-r--r--indra/llinventory/llsettingswater.h4
-rw-r--r--indra/llmessage/llassetstorage.cpp38
-rw-r--r--indra/newview/llsettingsvo.cpp2
-rw-r--r--indra/newview/llsettingsvo.h30
7 files changed, 58 insertions, 40 deletions
diff --git a/indra/llinventory/llsettingsbase.cpp b/indra/llinventory/llsettingsbase.cpp
index 7cedffa507..abe1a1a04a 100644
--- a/indra/llinventory/llsettingsbase.cpp
+++ b/indra/llinventory/llsettingsbase.cpp
@@ -39,7 +39,7 @@ namespace
}
//=========================================================================
-std::ostream &::operator <<(std::ostream& os, LLSettingsBase &settings)
+std::ostream &operator <<(std::ostream& os, LLSettingsBase &settings)
{
LLSDSerialize::serialize(settings.getSettings(), os, LLSDSerialize::LLSD_NOTATION);
diff --git a/indra/llinventory/llsettingsdaycycle.h b/indra/llinventory/llsettingsdaycycle.h
index 7703f7a0b4..2d0fa4a840 100644
--- a/indra/llinventory/llsettingsdaycycle.h
+++ b/indra/llinventory/llsettingsdaycycle.h
@@ -71,15 +71,15 @@ public:
bool initialize();
virtual ptr_t buildClone() = 0;
- virtual LLSD getSettings() const;
+ virtual LLSD getSettings() const override;
virtual LLSettingsType getSettingTypeValue() const override { return LLSettingsType::ST_DAYCYCLE; }
//---------------------------------------------------------------------
- virtual std::string getSettingType() const { return std::string("daycycle"); }
+ virtual std::string getSettingType() const override { return std::string("daycycle"); }
// Settings status
- virtual void blend(const LLSettingsBase::ptr_t &other, F64 mix);
+ virtual void blend(const LLSettingsBase::ptr_t &other, F64 mix) override;
static LLSD defaults();
@@ -104,13 +104,13 @@ public:
void setInitialized(bool value = true) { mInitialized = value; }
CycleTrack_t & getCycleTrack(S32 track);
- virtual validation_list_t getValidationList() const;
+ virtual validation_list_t getValidationList() const override;
static validation_list_t validationList();
protected:
LLSettingsDay();
- virtual void updateSettings();
+ virtual void updateSettings() override;
bool mInitialized;
diff --git a/indra/llinventory/llsettingssky.h b/indra/llinventory/llsettingssky.h
index 5d7d3adbfe..df6a310647 100644
--- a/indra/llinventory/llsettingssky.h
+++ b/indra/llinventory/llsettingssky.h
@@ -52,6 +52,8 @@ public:
static const std::string SETTING_CLOUD_SCROLL_RATE;
static const std::string SETTING_CLOUD_SHADOW;
static const std::string SETTING_CLOUD_TEXTUREID;
+ static const std::string SETTING_DENSITY_MULTIPLIER;
+ static const std::string SETTING_DISTANCE_MULTIPLIER;
static const std::string SETTING_DOME_OFFSET;
static const std::string SETTING_DOME_RADIUS;
static const std::string SETTING_GAMMA;
@@ -97,7 +99,7 @@ public:
// Settings status
- virtual void blend(const LLSettingsBase::ptr_t &end, F64 blendf);
+ virtual void blend(const LLSettingsBase::ptr_t &end, F64 blendf) override;
static LLSD defaults();
@@ -439,13 +441,11 @@ public:
return mTotalAmbient;
}
- virtual validation_list_t getValidationList() const;
+ virtual validation_list_t getValidationList() const override;
static validation_list_t validationList();
static LLSD translateLegacySettings(LLSD legacy);
- static LLSD settingValidation(LLSD &settings, validation_list_t &validations);
-
protected:
static const std::string SETTING_LEGACY_EAST_ANGLE;
static const std::string SETTING_LEGACY_ENABLE_CLOUD_SCROLL;
@@ -453,9 +453,9 @@ protected:
LLSettingsSky();
- virtual stringset_t getSlerpKeys() const;
+ virtual stringset_t getSlerpKeys() const override;
- virtual void updateSettings();
+ virtual void updateSettings() override;
private:
// validations for structured sections of sky settings data
diff --git a/indra/llinventory/llsettingswater.h b/indra/llinventory/llsettingswater.h
index 16d5b2353a..d4152acfa1 100644
--- a/indra/llinventory/llsettingswater.h
+++ b/indra/llinventory/llsettingswater.h
@@ -61,7 +61,7 @@ public:
virtual LLSettingsType getSettingTypeValue() const override { return LLSettingsType::ST_WATER; }
// Settings status
- virtual void blend(const LLSettingsBase::ptr_t &end, F64 blendf);
+ virtual void blend(const LLSettingsBase::ptr_t &end, F64 blendf) override;
static LLSD defaults();
@@ -199,7 +199,7 @@ public:
return mWaterFogKS;
}
- virtual validation_list_t getValidationList() const;
+ virtual validation_list_t getValidationList() const override;
static validation_list_t validationList();
static LLSD translateLegacySettings(LLSD legacy);
diff --git a/indra/llmessage/llassetstorage.cpp b/indra/llmessage/llassetstorage.cpp
index 3d93f5aeb8..2b12a062c3 100644
--- a/indra/llmessage/llassetstorage.cpp
+++ b/indra/llmessage/llassetstorage.cpp
@@ -64,20 +64,38 @@ const U64 TOXIC_ASSET_LIFETIME = (120 * 1000000); // microseconds
namespace
{
- template<typename T, typename... U>
- bool operator == (const std::function<T(U...)> &a, const std::function <T(U...)> &b)
+ bool operator == (const LLAssetStorage::LLGetAssetCallback &lhs, const LLAssetStorage::LLGetAssetCallback &rhs)
{
- typedef T(fnType)(U...);
-
- auto fnPtrA = a.target<T(*)(U...)>();
- auto fnPtrB = b.target<T(*)(U...)>();
- if (fnPtrA && fnPtrB)
- return (*fnPtrA == *fnPtrB);
- else if (!fnPtrA && !fnPtrB)
+ auto fnPtrLhs = lhs.target<LLAssetStorage::LLGetAssetCallback>();
+ auto fnPtrRhs = rhs.target<LLAssetStorage::LLGetAssetCallback>();
+ if (fnPtrLhs && fnPtrRhs)
+ return (*fnPtrLhs == *fnPtrRhs);
+ else if (!fnPtrLhs && !fnPtrRhs)
return true;
return false;
}
+// Rider: This is the general case of the operator declared above. The code compares the callback
+// passed into the LLAssetStorage functions to determine if there are duplicated requests for an
+// asset. Unfortunately std::function does not provide a direct way to compare two variables so
+// we define the operator here.
+// XCode is not very happy with the variadic temples in use below so we will just define the specific
+// case of comparing two LLGetAssetCallback objects since that is all we really use.
+//
+// template<typename T, typename... U>
+// bool operator == (const std::function<T(U...)> &a, const std::function <T(U...)> &b)
+// {
+// typedef T(fnType)(U...);
+//
+// auto fnPtrA = a.target<T(*)(U...)>();
+// auto fnPtrB = b.target<T(*)(U...)>();
+// if (fnPtrA && fnPtrB)
+// return (*fnPtrA == *fnPtrB);
+// else if (!fnPtrA && !fnPtrB)
+// return true;
+// return false;
+// }
+
}
///----------------------------------------------------------------------------
@@ -467,7 +485,7 @@ bool LLAssetStorage::findInStaticVFSAndInvokeCallback(const LLUUID& uuid, LLAsse
// IW - uuid is passed by value to avoid side effects, please don't re-add &
void LLAssetStorage::getAssetData(const LLUUID uuid,
LLAssetType::EType type,
- LLGetAssetCallback callback,
+ LLAssetStorage::LLGetAssetCallback callback,
void *user_data,
BOOL is_priority)
{
diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp
index 4a7c22c166..861615b14b 100644
--- a/indra/newview/llsettingsvo.cpp
+++ b/indra/newview/llsettingsvo.cpp
@@ -305,7 +305,7 @@ LLSettingsBase::ptr_t LLSettingsVOBase::importFile(const std::string &filename)
catch (const std::ios_base::failure &e)
{
LL_WARNS("SETTINGS") << "Unable to save settings to file '" << filename << "': " << e.what() << LL_ENDL;
- return false;
+ return LLSettingsBase::ptr_t();
}
std::string settingtype = settings[SETTING_NAME].asString();
diff --git a/indra/newview/llsettingsvo.h b/indra/newview/llsettingsvo.h
index 55e04b5f3a..7f8dc40c36 100644
--- a/indra/newview/llsettingsvo.h
+++ b/indra/newview/llsettingsvo.h
@@ -85,17 +85,17 @@ public:
static ptr_t buildFromLegacyPreset(const std::string &name, const LLSD &oldsettings);
static ptr_t buildDefaultSky();
- virtual ptr_t buildClone();
+ virtual ptr_t buildClone() override;
static LLSD convertToLegacy(const ptr_t &);
protected:
LLSettingsVOSky();
- virtual void updateSettings();
+ virtual void updateSettings() override;
- virtual void applySpecial(void *);
+ virtual void applySpecial(void *) override;
- virtual parammapping_t getParameterMap() const;
+ virtual parammapping_t getParameterMap() const override;
};
@@ -109,16 +109,16 @@ public:
static ptr_t buildFromLegacyPreset(const std::string &name, const LLSD &oldsettings);
static ptr_t buildDefaultWater();
- virtual ptr_t buildClone();
+ virtual ptr_t buildClone() override;
static LLSD convertToLegacy(const ptr_t &);
protected:
LLSettingsVOWater();
- virtual void updateSettings();
- virtual void applySpecial(void *);
+ virtual void updateSettings() override;
+ virtual void applySpecial(void *) override;
- virtual parammapping_t getParameterMap() const;
+ virtual parammapping_t getParameterMap() const override;
private:
@@ -138,16 +138,16 @@ public:
static ptr_t buildFromLegacyMessage(const LLUUID &regionId, LLSD daycycle, LLSD skys, LLSD water);
static ptr_t buildDefaultDayCycle();
static ptr_t buildFromEnvironmentMessage(LLSD settings);
- virtual ptr_t buildClone();
+ virtual ptr_t buildClone() override;
static LLSD convertToLegacy(const ptr_t &);
- virtual LLSettingsSkyPtr_t getDefaultSky() const;
- virtual LLSettingsWaterPtr_t getDefaultWater() const;
- virtual LLSettingsSkyPtr_t buildSky(LLSD) const;
- virtual LLSettingsWaterPtr_t buildWater(LLSD) const;
- virtual LLSettingsSkyPtr_t getNamedSky(const std::string &) const;
- virtual LLSettingsWaterPtr_t getNamedWater(const std::string &) const;
+ virtual LLSettingsSkyPtr_t getDefaultSky() const override;
+ virtual LLSettingsWaterPtr_t getDefaultWater() const override;
+ virtual LLSettingsSkyPtr_t buildSky(LLSD) const override;
+ virtual LLSettingsWaterPtr_t buildWater(LLSD) const override;
+ virtual LLSettingsSkyPtr_t getNamedSky(const std::string &) const override;
+ virtual LLSettingsWaterPtr_t getNamedWater(const std::string &) const override;
protected:
LLSettingsVODay();