summaryrefslogtreecommitdiff
path: root/indra/newview/llwlparammanager.h
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2008-06-26 00:39:00 +0000
committerSteven Bennetts <steve@lindenlab.com>2008-06-26 00:39:00 +0000
commit25c10ed028da5c547b11f1f461916897272b0e6d (patch)
tree350a5858f8970b6e28b2dc395625d74d8bd597b2 /indra/newview/llwlparammanager.h
parent6dd125d375b38455997a0c4b8747659f4c2351aa (diff)
QAR-628 merge string-cleanup-5 -r 90476:90508 -> release
dataserver-is-deprecated
Diffstat (limited to 'indra/newview/llwlparammanager.h')
-rw-r--r--indra/newview/llwlparammanager.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/indra/newview/llwlparammanager.h b/indra/newview/llwlparammanager.h
index 474db19cfa..1a2b2a3903 100644
--- a/indra/newview/llwlparammanager.h
+++ b/indra/newview/llwlparammanager.h
@@ -45,15 +45,15 @@ class LLGLSLShader;
struct WLColorControl {
F32 r, g, b, i; /// the values
- char const * name; /// name to use to dereference params
+ std::string mName; /// name to use to dereference params
std::string mSliderName; /// name of the slider in menu
bool hasSliderName; /// only set slider name for true color types
bool isSunOrAmbientColor; /// flag for if it's the sun or ambient color controller
bool isBlueHorizonOrDensity; /// flag for if it's the Blue Horizon or Density color controller
- inline WLColorControl(F32 red, F32 green, F32 blue, F32 intensity, char const * n,
- char const * sliderName = "")
- : r(red), g(green), b(blue), i(intensity), name(n), mSliderName(sliderName)
+ inline WLColorControl(F32 red, F32 green, F32 blue, F32 intensity,
+ const std::string& n, const std::string& sliderName = LLStringUtil::null)
+ : r(red), g(green), b(blue), i(intensity), mName(n), mSliderName(sliderName)
{
// if there's a slider name, say we have one
hasSliderName = false;
@@ -90,18 +90,18 @@ struct WLColorControl {
}
inline void update(LLWLParamSet & params) const {
- params.set(name, r, g, b, i);
+ params.set(mName, r, g, b, i);
}
};
// float slider control
struct WLFloatControl {
F32 x;
- char const * name;
+ std::string mName;
F32 mult;
- inline WLFloatControl(F32 val, char const * n, F32 m=1.0f)
- : x(val), name(n), mult(m)
+ inline WLFloatControl(F32 val, const std::string& n, F32 m=1.0f)
+ : x(val), mName(n), mult(m)
{
}
@@ -116,7 +116,7 @@ struct WLFloatControl {
}
inline void update(LLWLParamSet & params) const {
- params.set(name, x);
+ params.set(mName, x);
}
};
@@ -129,16 +129,16 @@ public:
~LLWLParamManager();
/// load a preset file
- void loadPresets(const LLString & fileName);
+ void loadPresets(const std::string & fileName);
/// save the preset file
- void savePresets(const LLString & fileName);
+ void savePresets(const std::string & fileName);
/// load an individual preset into the sky
- void loadPreset(const LLString & name);
+ void loadPreset(const std::string & name);
/// save the parameter presets to file
- void savePreset(const LLString & name);
+ void savePreset(const std::string & name);
/// Set shader uniforms dirty, so they'll update automatically.
void propagateParameters(void);