From ba982c0575515a8524d5044f928cd336303f807c Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Sat, 6 Apr 2013 21:47:13 +1000 Subject: Clean up some compiler warnings. More to come. --- linden/indra/llui/llfunctorregistry.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'linden/indra/llui') diff --git a/linden/indra/llui/llfunctorregistry.h b/linden/indra/llui/llfunctorregistry.h index 8864f7a..7c03f2f 100644 --- a/linden/indra/llui/llfunctorregistry.h +++ b/linden/indra/llui/llfunctorregistry.h @@ -75,7 +75,6 @@ public: bool registerFunctor(const std::string& name, ResponseFunctor f) { bool retval = true; - typename FunctorMap::iterator it = mMap.find(name); if (mMap.count(name) == 0) { mMap[name] = f; @@ -102,7 +101,6 @@ public: FUNCTOR_TYPE getFunctor(const std::string& name) { - typename FunctorMap::iterator it = mMap.find(name); if (mMap.count(name) != 0) { return mMap[name]; -- cgit v1.1 From 0f7ca330c308a5edb51ee325faf26e5498b38af9 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Mon, 8 Apr 2013 04:47:32 +1000 Subject: Delete a big bunch of unused variables. --- linden/indra/llui/llfloater.cpp | 16 ---------------- linden/indra/llui/llkeywords.cpp | 2 -- linden/indra/llui/llmenugl.cpp | 2 -- linden/indra/llui/llslider.cpp | 1 - linden/indra/llui/lltexteditor.cpp | 4 ---- 5 files changed, 25 deletions(-) (limited to 'linden/indra/llui') diff --git a/linden/indra/llui/llfloater.cpp b/linden/indra/llui/llfloater.cpp index 58c717a..4c4aeaf 100644 --- a/linden/indra/llui/llfloater.cpp +++ b/linden/indra/llui/llfloater.cpp @@ -277,30 +277,14 @@ void LLFloater::initFloater(const std::string& title, mMinimized = FALSE; mExpandedRect.set(0,0,0,0); - S32 close_pad; // space to the right of close box S32 close_box_size; // For layout purposes, how big is the close box? if (close_btn) { close_box_size = LLFLOATER_CLOSE_BOX_SIZE; - close_pad = 0; } else { close_box_size = 0; - close_pad = 0; - } - - S32 minimize_box_size; - S32 minimize_pad; - if (minimizable && !drag_on_left) - { - minimize_box_size = LLFLOATER_CLOSE_BOX_SIZE; - minimize_pad = 0; - } - else - { - minimize_box_size = 0; - minimize_pad = 0; } // Drag Handle diff --git a/linden/indra/llui/llkeywords.cpp b/linden/indra/llui/llkeywords.cpp index 93da44c..a50dbff 100644 --- a/linden/indra/llui/llkeywords.cpp +++ b/linden/indra/llui/llkeywords.cpp @@ -288,7 +288,6 @@ void LLKeywords::findSegments(std::vector* seg_list, const LLWS const llwchar* base = wtext.c_str(); const llwchar* cur = base; - const llwchar* line = NULL; while( *cur ) { @@ -304,7 +303,6 @@ void LLKeywords::findSegments(std::vector* seg_list, const LLWS } // Start of a new line - line = cur; // Skip white space while( *cur && isspace(*cur) && (*cur != '\n') ) diff --git a/linden/indra/llui/llmenugl.cpp b/linden/indra/llui/llmenugl.cpp index 2d4a2f1..6850891 100644 --- a/linden/indra/llui/llmenugl.cpp +++ b/linden/indra/llui/llmenugl.cpp @@ -3095,8 +3095,6 @@ void LLMenuGL::draw( void ) LLUI::sConfigGroup->getS32("DropShadowFloater") ); } - LLColor4 bg_color = mBackgroundColor; - if( mBgVisible ) { gl_rect_2d( 0, getRect().getHeight(), getRect().getWidth(), 0, mBackgroundColor ); diff --git a/linden/indra/llui/llslider.cpp b/linden/indra/llui/llslider.cpp index 5c17baa..c8f5935 100644 --- a/linden/indra/llui/llslider.cpp +++ b/linden/indra/llui/llslider.cpp @@ -283,7 +283,6 @@ void LLSlider::draw() F32 opacity = getEnabled() ? 1.f : 0.3f; LLColor4 center_color = (mThumbCenterColor % opacity); - LLColor4 track_color = (mTrackColor % opacity); // Track LLRect track_rect(mThumbImage->getWidth() / 2, diff --git a/linden/indra/llui/lltexteditor.cpp b/linden/indra/llui/lltexteditor.cpp index c8ca5bf..1c12ff3 100644 --- a/linden/indra/llui/lltexteditor.cpp +++ b/linden/indra/llui/lltexteditor.cpp @@ -3077,7 +3077,6 @@ void LLTextEditor::drawSelectionBackground() S32 selection_right_x = mTextRect.mRight; S32 selection_right_y = mTextRect.mBottom; - BOOL selection_left_visible = FALSE; BOOL selection_right_visible = FALSE; // Skip through the lines we aren't drawing. @@ -3085,7 +3084,6 @@ void LLTextEditor::drawSelectionBackground() S32 left_line_num = cur_line; S32 num_lines = getLineCount(); - S32 right_line_num = num_lines - 1; S32 line_start = -1; if (cur_line >= num_lines) @@ -3119,13 +3117,11 @@ void LLTextEditor::drawSelectionBackground() if( line_start <= selection_left && selection_left <= line_end ) { left_line_num = cur_line; - selection_left_visible = TRUE; selection_left_x = mTextRect.mLeft + mGLFont->getWidth(line, 0, selection_left - line_start, mAllowEmbeddedItems); selection_left_y = text_y; } if( line_start <= selection_right && selection_right <= line_end ) { - right_line_num = cur_line; selection_right_visible = TRUE; selection_right_x = mTextRect.mLeft + mGLFont->getWidth(line, 0, selection_right - line_start, mAllowEmbeddedItems); if (selection_right == line_end) -- cgit v1.1 From e6734283dee37ee41ea82d190aa64d84f04215e9 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Mon, 8 Apr 2013 04:53:41 +1000 Subject: More unused variable deletion. --- linden/indra/llui/llpanel.cpp | 1 - linden/indra/llui/llprogressbar.cpp | 3 --- 2 files changed, 4 deletions(-) (limited to 'linden/indra/llui') diff --git a/linden/indra/llui/llpanel.cpp b/linden/indra/llui/llpanel.cpp index 07e78ed..361e4f3 100644 --- a/linden/indra/llui/llpanel.cpp +++ b/linden/indra/llui/llpanel.cpp @@ -1078,7 +1078,6 @@ struct LLLayoutStack::LLEmbeddedPanel mVisibleAmt(1.f) // default to fully visible { LLResizeBar::Side side = (orientation == HORIZONTAL) ? LLResizeBar::RIGHT : LLResizeBar::BOTTOM; - LLRect resize_bar_rect = panelp->getRect(); S32 min_dim; if (orientation == HORIZONTAL) diff --git a/linden/indra/llui/llprogressbar.cpp b/linden/indra/llui/llprogressbar.cpp index d148733..0000d77 100644 --- a/linden/indra/llui/llprogressbar.cpp +++ b/linden/indra/llui/llprogressbar.cpp @@ -83,9 +83,6 @@ void LLProgressBar::draw() bar_bg_imagep->draw(getLocalRect(), background_color); - F32 alpha = 0.5f + 0.5f*0.5f*(1.f + (F32)sin(3.f*timer.getElapsedTimeF32())); - LLColor4 bar_color = LLUI::sColorsGroup->getColor("LoginProgressBarFgColor"); - bar_color.mV[3] = alpha; LLRect progress_rect = getLocalRect(); progress_rect.mRight = llround(getRect().getWidth() * (mPercentDone / 100.f)); bar_fg_imagep->draw(progress_rect); -- cgit v1.1 From e5cc2e99e6295aabe401f9c229a39574e0d9bf38 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Mon, 8 Apr 2013 04:55:18 +1000 Subject: Clean out a couple of compiler warnings. --- linden/indra/llui/llui.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'linden/indra/llui') diff --git a/linden/indra/llui/llui.h b/linden/indra/llui/llui.h index ebcc730..466d2c7 100644 --- a/linden/indra/llui/llui.h +++ b/linden/indra/llui/llui.h @@ -706,10 +706,12 @@ public: // this avoids a MSVC bug where non-referenced static members are "optimized" away // even if their constructors have side effects + // Then we avoid a compiler warning that dummy is never used. lol void reference() { S32 dummy; dummy = 0; + dummy = dummy + 0; } }; -- cgit v1.1