Transplant settings improvements to sanity check types

master
Ansariel 2016-03-31 21:52:47 +02:00
parent 007cb590ba
commit 1ca7437292
3 changed files with 15 additions and 14 deletions

View File

@ -419,19 +419,20 @@ const std::string LLControlGroup::mTypeString[TYPE_COUNT] = { "U32"
,"LLSD"
};
const std::string LLControlGroup::mSanityTypeString[SANITY_TYPE_COUNT] = { "None"
,"Equals"
,"NotEquals"
,"LessThan"
,"GreaterThan"
,"LessThanEquals"
,"GreaterThanEquals"
,"Between"
,"NotBetween"
};
LLControlGroup::LLControlGroup(const std::string& name)
: LLInstanceTracker<LLControlGroup, std::string>(name)
{
mSanityTypeString[SANITY_TYPE_NONE] = "None";
mSanityTypeString[SANITY_TYPE_EQUALS] = "Equals";
mSanityTypeString[SANITY_TYPE_NOT_EQUALS] = "NotEquals";
mSanityTypeString[SANITY_TYPE_LESS_THAN] = "LessThan";
mSanityTypeString[SANITY_TYPE_GREATER_THAN] = "GreaterThan";
mSanityTypeString[SANITY_TYPE_LESS_THAN_EQUALS] = "LessThanEquals";
mSanityTypeString[SANITY_TYPE_GREATER_THAN_EQUALS] = "GreaterThanEquals";
mSanityTypeString[SANITY_TYPE_BETWEEN] = "Between";
mSanityTypeString[SANITY_TYPE_NOT_BETWEEN] = "NotBetween";
}
LLControlGroup::~LLControlGroup()

View File

@ -226,13 +226,13 @@ protected:
typedef std::map<std::string, LLControlVariablePtr > ctrl_name_table_t;
ctrl_name_table_t mNameTable;
static const std::string mTypeString[TYPE_COUNT];
std::string mSanityTypeString[SANITY_TYPE_COUNT];
static const std::string mSanityTypeString[SANITY_TYPE_COUNT];
public:
static eControlType typeStringToEnum(const std::string& typestr);
eSanityType sanityTypeStringToEnum(const std::string& sanitystr);
static eSanityType sanityTypeStringToEnum(const std::string& sanitystr);
static std::string typeEnumToString(eControlType typeenum);
std::string sanityTypeEnumToString(eSanityType sanitytypeenum);
static std::string sanityTypeEnumToString(eSanityType sanitytypeenum);
LLControlGroup(const std::string& name);
~LLControlGroup();

View File

@ -69,7 +69,7 @@ void SanityCheck::onSanity(LLControlVariable* controlp)
lastControl = controlp;
std::string checkType = "SanityCheck" + gSavedSettings.sanityTypeEnumToString(controlp->getSanityType());
std::string checkType = "SanityCheck" + LLControlGroup::sanityTypeEnumToString(controlp->getSanityType());
std::vector<LLSD> sanityValues = controlp->getSanityValues();
LLSD args;