aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llhudeffectlookat.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-09-06 18:24:57 -0500
committerJacek Antonelli2008-09-06 18:25:07 -0500
commit798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch)
tree1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/newview/llhudeffectlookat.cpp
parentSecond Life viewer sources 1.20.15 (diff)
downloadmeta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.zip
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.gz
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.bz2
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.xz
Second Life viewer sources 1.21.0-RC
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llhudeffectlookat.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/linden/indra/newview/llhudeffectlookat.cpp b/linden/indra/newview/llhudeffectlookat.cpp
index 0829fb2..b5f6ec7 100644
--- a/linden/indra/newview/llhudeffectlookat.cpp
+++ b/linden/indra/newview/llhudeffectlookat.cpp
@@ -73,13 +73,16 @@ const F32 MAX_TIMEOUT = F32_MAX / 2.f;
73class LLAttention 73class LLAttention
74{ 74{
75public: 75public:
76 LLAttention(){} 76 LLAttention()
77 LLAttention(F32 timeout, F32 priority, char *name, LLColor3 color) : 77 : mTimeout(0.f),
78 mPriority(0.f)
79 {}
80 LLAttention(F32 timeout, F32 priority, const std::string& name, LLColor3 color) :
78 mTimeout(timeout), mPriority(priority), mName(name), mColor(color) 81 mTimeout(timeout), mPriority(priority), mName(name), mColor(color)
79 { 82 {
80 } 83 }
81 F32 mTimeout, mPriority; 84 F32 mTimeout, mPriority;
82 LLString mName; 85 std::string mName;
83 LLColor3 mColor; 86 LLColor3 mColor;
84}; 87};
85 88
@@ -147,7 +150,7 @@ static BOOL loadGender(LLXmlTreeNode* gender)
147 { 150 {
148 return FALSE; 151 return FALSE;
149 } 152 }
150 LLString str; 153 std::string str;
151 gender->getAttributeString("name", str); 154 gender->getAttributeString("name", str);
152 LLAttentionSet& attentions = (str.compare("Masculine") == 0) ? gBoyAttentions : gGirlAttentions; 155 LLAttentionSet& attentions = (str.compare("Masculine") == 0) ? gBoyAttentions : gGirlAttentions;
153 for (LLXmlTreeNode* attention_node = gender->getChildByName( "param" ); 156 for (LLXmlTreeNode* attention_node = gender->getChildByName( "param" );
@@ -186,9 +189,8 @@ static BOOL loadAttentions()
186 } 189 }
187 first_time = FALSE; 190 first_time = FALSE;
188 191
189 char filename[MAX_PATH]; /*Flawfinder: ignore*/ 192 std::string filename;
190 strncpy(filename,gDirUtilp->getExpandedFilename(LL_PATH_CHARACTER,"attentions.xml").c_str(), sizeof(filename) -1); /*Flawfinder: ignore*/ 193 filename = gDirUtilp->getExpandedFilename(LL_PATH_CHARACTER,"attentions.xml");
191 filename[sizeof(filename) -1] = '\0';
192 LLXmlTree xml_tree; 194 LLXmlTree xml_tree;
193 BOOL success = xml_tree.parseFile( filename, FALSE ); 195 BOOL success = xml_tree.parseFile( filename, FALSE );
194 if( !success ) 196 if( !success )
@@ -210,7 +212,7 @@ static BOOL loadAttentions()
210 return FALSE; 212 return FALSE;
211 } 213 }
212 214
213 LLString version; 215 std::string version;
214 static LLStdStringHandle version_string = LLXmlTree::addAttributeString("version"); 216 static LLStdStringHandle version_string = LLXmlTree::addAttributeString("version");
215 if( !root->getFastAttributeString( version_string, version ) || (version != "1.0") ) 217 if( !root->getFastAttributeString( version_string, version ) || (version != "1.0") )
216 { 218 {