summaryrefslogtreecommitdiff
path: root/indra/newview/llwlparammanager.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llwlparammanager.h')
-rw-r--r--indra/newview/llwlparammanager.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/indra/newview/llwlparammanager.h b/indra/newview/llwlparammanager.h
index 2f1edce8fc..35acb7c5d6 100644
--- a/indra/newview/llwlparammanager.h
+++ b/indra/newview/llwlparammanager.h
@@ -144,9 +144,13 @@ public:
}
inline LLWLParamKey(std::string& stringVal)
- : name(stringVal.substr(0, stringVal.length()-1)),
- scope((EScope)atoi(stringVal.substr(stringVal.length()-1, stringVal.length()).c_str()))
{
+ size_t len = stringVal.length();
+ if (len > 0)
+ {
+ name = stringVal.substr(0, len - 1);
+ scope = (EScope) atoi(stringVal.substr(len - 1, len).c_str());
+ }
}
inline std::string toStringVal() const
@@ -289,7 +293,7 @@ public:
std::map<LLWLParamKey, LLWLParamSet> finalizeFromDayCycle(LLWLParamKey::EScope scope);
// returns all skies in map (intended to be called with output from a finalize)
- LLSD createSkyMap(std::map<LLWLParamKey, LLWLParamSet> map);
+ static LLSD createSkyMap(std::map<LLWLParamKey, LLWLParamSet> map);
// helper variables
LLWLAnimator mAnimator;