Merge
commit
ccdf55f4ab
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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 ®ionId, 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();
|
||||
|
|
|
|||
Loading…
Reference in New Issue