diff options
author | Aaron Brashears <aaronb@lindenlab.com> | 2007-02-02 17:28:58 +0000 |
---|---|---|
committer | Aaron Brashears <aaronb@lindenlab.com> | 2007-02-02 17:28:58 +0000 |
commit | 305c74d5163c5e344a675d39ca2394a9e45bd2c2 (patch) | |
tree | 42836c4a6010b2b015156024d3cfb6bf64a48ad6 /indra/llui | |
parent | 54d89549df38bb61881583a3eb8d3645c107d79f (diff) |
Result of svn merge -r57264:57370 svn+ssh://svn/svn/linden/branches/adroit.r40-68 into release.
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llfloater.cpp | 14 | ||||
-rw-r--r-- | indra/llui/llfloater.h | 4 | ||||
-rw-r--r-- | indra/llui/llkeywords.cpp | 24 | ||||
-rw-r--r-- | indra/llui/llmenugl.cpp | 2 | ||||
-rw-r--r-- | indra/llui/llresmgr.cpp | 4 | ||||
-rw-r--r-- | indra/llui/lltexteditor.cpp | 11 | ||||
-rw-r--r-- | indra/llui/llui.cpp | 6 | ||||
-rw-r--r-- | indra/llui/lluictrlfactory.cpp | 4 |
8 files changed, 37 insertions, 32 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 0e5d37d93e..b37602093f 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -498,7 +498,7 @@ LLView* LLFloater::getRootMostFastFrameView() return LLView::getRootMostFastFrameView(); } -void LLFloater::open() +void LLFloater::open() /* Flawfinder: ignore */ { //RN: for now, we don't allow rehosting from one multifloater to another // just need to fix the bugs @@ -1188,7 +1188,7 @@ void LLFloater::onClickTearOff(void *userdata) new_rect.setLeftTopAndSize(host_floater->getRect().mLeft + 5, host_floater->getRect().mTop - LLFLOATER_HEADER_SIZE - 5, self->mRect.getWidth(), self->mRect.getHeight()); - self->open(); + self->open(); /* Flawfinder: ignore */ self->setRect(new_rect); gFloaterView->adjustToFitScreen(self, FALSE); self->setCanDrag(TRUE); @@ -2424,11 +2424,11 @@ void LLMultiFloater::init(const LLString& title, BOOL resizable, addChild(mTabContainer);*/ } -void LLMultiFloater::open() +void LLMultiFloater::open() /* Flawfinder: ignore */ { if (mTabContainer->getTabCount() > 0) { - LLFloater::open(); + LLFloater::open(); /* Flawfinder: ignore */ } else { @@ -2853,7 +2853,7 @@ LLView* LLFloater::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *f return floaterp; } -void LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory, BOOL open) +void LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory, BOOL open) /* Flawfinder: ignore */ { LLString name(getName()); LLString title(getTitle()); @@ -2927,8 +2927,8 @@ void LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactor } applyRectControl(); - if (open) + if (open) /* Flawfinder: ignore */ { - this->open(); + this->open(); /* Flawfinder: ignore */ } } diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index c9ebd64c28..c1ef54ed42 100644 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -103,7 +103,7 @@ public: virtual EWidgetType getWidgetType() const; virtual LLString getWidgetTag() const; - virtual void open(); + virtual void open(); /* Flawfinder: ignore */ // If allowed, close the floater cleanly, releasing focus. // app_quitting is passed to onClose() below. @@ -342,7 +342,7 @@ public: BOOL minimizable, BOOL close_btn); virtual BOOL postBuild(); - /*virtual*/ void open(); + /*virtual*/ void open(); /* Flawfinder: ignore */ /*virtual*/ void onClose(bool app_quitting); /*virtual*/ void draw(); /*virtual*/ void setVisible(BOOL visible); diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index e8628c9374..e40e401da5 100644 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -54,10 +54,10 @@ BOOL LLKeywords::loadFromFile( const LLString& filename ) // File header const S32 BUFFER_SIZE = 1024; - char buffer[BUFFER_SIZE]; + char buffer[BUFFER_SIZE]; /* Flawfinder: ignore */ llifstream file; - file.open(filename.c_str()); + file.open(filename.c_str()); /* Flawfinder: ignore */ if( file.fail() ) { llinfos << "LLKeywords::loadFromFile() Unable to open file: " << filename << llendl; @@ -95,34 +95,34 @@ BOOL LLKeywords::loadFromFile( const LLString& filename ) while (!file.eof()) { file.getline( buffer, BUFFER_SIZE ); - if( !strncmp( buffer, SOL_COMMENT, strlen(SOL_COMMENT) ) ) + if( !strncmp( buffer, SOL_COMMENT, strlen(SOL_COMMENT) ) ) /* Flawfinder: ignore */ { continue; } else - if( !strncmp( buffer, SOL_WORD, strlen(SOL_WORD) ) ) + if( !strncmp( buffer, SOL_WORD, strlen(SOL_WORD) ) ) /* Flawfinder: ignore */ { - cur_color = readColor( buffer + strlen(SOL_WORD) ); + cur_color = readColor( buffer + strlen(SOL_WORD) ); /* Flawfinder: ignore */ cur_type = LLKeywordToken::WORD; continue; } else - if( !strncmp( buffer, SOL_LINE, strlen(SOL_LINE) ) ) + if( !strncmp( buffer, SOL_LINE, strlen(SOL_LINE) ) ) /* Flawfinder: ignore */ { - cur_color = readColor( buffer + strlen(SOL_LINE) ); + cur_color = readColor( buffer + strlen(SOL_LINE) ); /* Flawfinder: ignore */ cur_type = LLKeywordToken::LINE; continue; } else - if( !strncmp( buffer, SOL_TWO_SIDED_DELIMITER, strlen(SOL_TWO_SIDED_DELIMITER) ) ) + if( !strncmp( buffer, SOL_TWO_SIDED_DELIMITER, strlen(SOL_TWO_SIDED_DELIMITER) ) ) /* Flawfinder: ignore */ { - cur_color = readColor( buffer + strlen(SOL_TWO_SIDED_DELIMITER) ); + cur_color = readColor( buffer + strlen(SOL_TWO_SIDED_DELIMITER) ); /* Flawfinder: ignore */ cur_type = LLKeywordToken::TWO_SIDED_DELIMITER; continue; } - if( !strncmp( buffer, SOL_ONE_SIDED_DELIMITER, strlen(SOL_ONE_SIDED_DELIMITER) ) ) + if( !strncmp( buffer, SOL_ONE_SIDED_DELIMITER, strlen(SOL_ONE_SIDED_DELIMITER) ) ) /* Flawfinder: ignore */ { - cur_color = readColor( buffer + strlen(SOL_ONE_SIDED_DELIMITER) ); + cur_color = readColor( buffer + strlen(SOL_ONE_SIDED_DELIMITER) ); /* Flawfinder: ignore */ cur_type = LLKeywordToken::ONE_SIDED_DELIMITER; continue; } @@ -201,7 +201,7 @@ LLColor3 LLKeywords::readColor( const LLString& s ) F32 r, g, b; r = g = b = 0.0f; S32 read = sscanf(s.c_str(), "%f, %f, %f]", &r, &g, &b ); - if( read != 3 ) + if( read != 3 ) /* Flawfinder: ignore */ { llinfos << " poorly formed color in keyword file" << llendl; } diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index f574d981ef..b2225aa1a0 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -4579,7 +4579,7 @@ LLTearOffMenu* LLTearOffMenu::create(LLMenuGL* menup) LLTearOffMenu* tearoffp = new LLTearOffMenu(menup); // keep onscreen gFloaterView->adjustToFitScreen(tearoffp, FALSE); - tearoffp->open(); + tearoffp->open(); /* Flawfinder: ignore */ return tearoffp; } diff --git a/indra/llui/llresmgr.cpp b/indra/llui/llresmgr.cpp index 67137d8bbb..96ca5637e6 100644 --- a/indra/llui/llresmgr.cpp +++ b/indra/llui/llresmgr.cpp @@ -302,8 +302,8 @@ void LLResMgr::getMonetaryString( LLString& output, S32 input ) const } S32 group_count = cur_group; - char reversed_output[20] = ""; - char forward_output[20] = ""; + char reversed_output[20] = ""; /* Flawfinder: ignore */ + char forward_output[20] = ""; /* Flawfinder: ignore */ S32 output_pos = 0; cur_group = 0; diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index a4747aef67..710e333796 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -3763,7 +3763,7 @@ BOOL LLTextEditor::importBuffer(const LLString& buffer ) // <text without \0> (text may contain ext_char_values) // }\n - char tbuf[MAX_STRING]; + char tbuf[MAX_STRING]; /* Flawfinder: ignore */ S32 version = 0; instream.getline(tbuf, MAX_STRING); @@ -3803,11 +3803,16 @@ BOOL LLTextEditor::importBuffer(const LLString& buffer ) BOOL success = TRUE; char* text = new char[ text_len + 1]; + if (text == NULL) + { + llerrs << "Memory allocation failure." << llendl; + return FALSE; + } instream.get(text, text_len + 1, '\0'); text[text_len] = '\0'; - if( text_len != (S32)strlen(text) ) + if( text_len != (S32)strlen(text) )/* Flawfinder: ignore */ { - llwarns << llformat("Invalid text length: %d != %d ",strlen(text),text_len) << llendl; + llwarns << llformat("Invalid text length: %d != %d ",strlen(text),text_len) << llendl;/* Flawfinder: ignore */ success = FALSE; } diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp index d951cb70f6..e8e3f271a0 100644 --- a/indra/llui/llui.cpp +++ b/indra/llui/llui.cpp @@ -1478,7 +1478,7 @@ void load_tr(const LLString& lang) LLString filename = gDirUtilp->getExpandedFilename(LL_PATH_SKINS, inname.c_str()); llifstream file; - file.open(filename.c_str(), std::ios_base::binary); + file.open(filename.c_str(), std::ios_base::binary); /* Flawfinder: ignore */ if (!file) { llinfos << "No translation dictionary for: " << filename << llendl; @@ -1491,7 +1491,7 @@ void load_tr(const LLString& lang) gUntranslated.clear(); const S32 MAX_LINE_LEN = 1024; - char buffer[MAX_LINE_LEN]; + char buffer[MAX_LINE_LEN]; /* Flawfinder: ignore */ while (!file.eof()) { file.getline(buffer, MAX_LINE_LEN); @@ -1531,7 +1531,7 @@ void cleanup_tr() LLString outname = "untranslated_" + gLanguage + ".txt"; LLString outfilename = gDirUtilp->getExpandedFilename(LL_PATH_SKINS, outname.c_str()); llofstream outfile; - outfile.open(outfilename.c_str()); + outfile.open(outfilename.c_str()); /* Flawfinder: ignore */ if (!outfile) { return; diff --git a/indra/llui/lluictrlfactory.cpp b/indra/llui/lluictrlfactory.cpp index 7f62194e58..8ae9fd0284 100644 --- a/indra/llui/lluictrlfactory.cpp +++ b/indra/llui/lluictrlfactory.cpp @@ -278,7 +278,7 @@ bool LLUICtrlFactory::getLayeredXMLNode(const LLString &filename, LLXMLNodePtr& // buildFloater() //----------------------------------------------------------------------------- void LLUICtrlFactory::buildFloater(LLFloater* floaterp, const LLString &filename, - const LLCallbackMap::map_t* factory_map, BOOL open) + const LLCallbackMap::map_t* factory_map, BOOL open) /* Flawfinder: ignore */ { LLXMLNodePtr root; @@ -299,7 +299,7 @@ void LLUICtrlFactory::buildFloater(LLFloater* floaterp, const LLString &filename mFactoryStack.push_front(factory_map); } - floaterp->initFloaterXML(root, NULL, this, open); + floaterp->initFloaterXML(root, NULL, this, open); /* Flawfinder: ignore */ if (LLUI::sShowXUINames) { |