From 798d367d54a6c6379ad355bd8345fa40e31e7fe9 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Sat, 6 Sep 2008 18:24:57 -0500 Subject: Second Life viewer sources 1.21.0-RC --- linden/indra/newview/llhudeffectlookat.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'linden/indra/newview/llhudeffectlookat.cpp') 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; class LLAttention { public: - LLAttention(){} - LLAttention(F32 timeout, F32 priority, char *name, LLColor3 color) : + LLAttention() + : mTimeout(0.f), + mPriority(0.f) + {} + LLAttention(F32 timeout, F32 priority, const std::string& name, LLColor3 color) : mTimeout(timeout), mPriority(priority), mName(name), mColor(color) { } F32 mTimeout, mPriority; - LLString mName; + std::string mName; LLColor3 mColor; }; @@ -147,7 +150,7 @@ static BOOL loadGender(LLXmlTreeNode* gender) { return FALSE; } - LLString str; + std::string str; gender->getAttributeString("name", str); LLAttentionSet& attentions = (str.compare("Masculine") == 0) ? gBoyAttentions : gGirlAttentions; for (LLXmlTreeNode* attention_node = gender->getChildByName( "param" ); @@ -186,9 +189,8 @@ static BOOL loadAttentions() } first_time = FALSE; - char filename[MAX_PATH]; /*Flawfinder: ignore*/ - strncpy(filename,gDirUtilp->getExpandedFilename(LL_PATH_CHARACTER,"attentions.xml").c_str(), sizeof(filename) -1); /*Flawfinder: ignore*/ - filename[sizeof(filename) -1] = '\0'; + std::string filename; + filename = gDirUtilp->getExpandedFilename(LL_PATH_CHARACTER,"attentions.xml"); LLXmlTree xml_tree; BOOL success = xml_tree.parseFile( filename, FALSE ); if( !success ) @@ -210,7 +212,7 @@ static BOOL loadAttentions() return FALSE; } - LLString version; + std::string version; static LLStdStringHandle version_string = LLXmlTree::addAttributeString("version"); if( !root->getFastAttributeString( version_string, version ) || (version != "1.0") ) { -- cgit v1.1