Remove unused variables, unused assignments

This commit is contained in:
Paul Cornett
2019-02-25 09:12:43 -08:00
parent ceee8d554a
commit b5028f267d
7 changed files with 1 additions and 22 deletions

View File

@@ -554,10 +554,6 @@ void BitmapComboBoxWidgetsPage::OnButtonInsert(wxCommandEvent& WXUNUSED(event))
m_textInsert->SetValue(wxString::Format("test item %u", ++s_item)); m_textInsert->SetValue(wxString::Format("test item %u", ++s_item));
} }
int sel = m_combobox->GetSelection();
if ( sel == wxNOT_FOUND )
sel = m_combobox->GetCount();
m_combobox->Insert(s, wxNullBitmap, m_combobox->GetSelection()); m_combobox->Insert(s, wxNullBitmap, m_combobox->GetSelection());
} }

View File

@@ -162,10 +162,7 @@ void wxAuiGenericToolBarArt::UpdateColoursFromSystem()
{ {
m_baseColour = GetBaseColor(); m_baseColour = GetBaseColor();
m_highlightColour = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT); m_highlightColour = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT);
wxColor darker1Colour = m_baseColour.ChangeLightness(85);
wxColor darker2Colour = m_baseColour.ChangeLightness(75);
wxColor darker3Colour = m_baseColour.ChangeLightness(60); wxColor darker3Colour = m_baseColour.ChangeLightness(60);
wxColor darker4Colour = m_baseColour.ChangeLightness(50);
wxColor darker5Colour = m_baseColour.ChangeLightness(40); wxColor darker5Colour = m_baseColour.ChangeLightness(40);
int pen_width = wxWindow::FromDIP(1, NULL); int pen_width = wxWindow::FromDIP(1, NULL);

View File

@@ -791,11 +791,7 @@ bool wxAuiTabContainer::IsTabVisible(int tabPage, int tabOffset, wxDC* dc, wxWin
if (offset == 0) if (offset == 0)
offset += m_art->GetIndentSize(); offset += m_art->GetIndentSize();
wxRect active_rect;
wxRect rect = m_rect; wxRect rect = m_rect;
rect.y = 0;
rect.height = m_rect.height;
// See if the given page is visible at the given tab offset (effectively scroll position) // See if the given page is visible at the given tab offset (effectively scroll position)
for (i = tabOffset; i < page_count; ++i) for (i = tabOffset; i < page_count; ++i)
@@ -803,7 +799,6 @@ bool wxAuiTabContainer::IsTabVisible(int tabPage, int tabOffset, wxDC* dc, wxWin
wxAuiNotebookPage& page = m_pages.Item(i); wxAuiNotebookPage& page = m_pages.Item(i);
wxAuiTabContainerButton& tab_button = m_tabCloseButtons.Item(i); wxAuiTabContainerButton& tab_button = m_tabCloseButtons.Item(i);
rect.x = offset;
rect.width = m_rect.width - right_buttons_width - offset - wnd->FromDIP(2); rect.width = m_rect.width - right_buttons_width - offset - wnd->FromDIP(2);
if (rect.width <= 0) if (rect.width <= 0)

View File

@@ -751,10 +751,7 @@ void wxAuiDefaultDockArt::DrawPaneButton(wxDC& dc,
wxRect rect = _rect; wxRect rect = _rect;
int old_y = rect.y;
rect.y = rect.y + (rect.height/2) - (bmp.GetScaledHeight()/2); rect.y = rect.y + (rect.height/2) - (bmp.GetScaledHeight()/2);
rect.height = old_y + rect.height - rect.y - 1;
if (button_state == wxAUI_BUTTON_STATE_PRESSED) if (button_state == wxAUI_BUTTON_STATE_PRESSED)
{ {

View File

@@ -1726,17 +1726,14 @@ void wxAuiManager::GetPanePositionsAndSizes(wxAuiDockInfo& dock,
if (action_pane == -1) if (action_pane == -1)
return; return;
offset = 0;
for (pane_i = action_pane-1; pane_i >= 0; --pane_i) for (pane_i = action_pane-1; pane_i >= 0; --pane_i)
{ {
int amount = positions[pane_i+1] - (positions[pane_i] + sizes[pane_i]); int amount = positions[pane_i+1] - (positions[pane_i] + sizes[pane_i]);
if (amount >= 0) if (amount >= 0)
offset += amount; ;
else else
positions[pane_i] -= -amount; positions[pane_i] -= -amount;
offset += sizes[pane_i];
} }
// if the dock mode is fixed, make sure none of the panes // if the dock mode is fixed, make sure none of the panes

View File

@@ -1073,7 +1073,6 @@ bool wxZipEntry::LoadExtraInfo(const char* extraData, wxUint16 extraLen, bool lo
// promoted to int, which has range large enough to deal with any value // promoted to int, which has range large enough to deal with any value
// of the field length. // of the field length.
extraData += fieldLen + 4; extraData += fieldLen + 4;
extraLen -= fieldLen + 4;
} }
// extraInfo had unknown format // extraInfo had unknown format

View File

@@ -211,7 +211,6 @@ bool wxGenericDragImage::BeginDrag(const wxPoint& hotspot,
// dragged. // dragged.
wxSize clientSize; wxSize clientSize;
wxPoint pt;
if (!m_fullScreen) if (!m_fullScreen)
{ {
clientSize = window->GetClientSize(); clientSize = window->GetClientSize();
@@ -225,7 +224,6 @@ bool wxGenericDragImage::BeginDrag(const wxPoint& hotspot,
clientSize.x = w; clientSize.y = h; clientSize.x = w; clientSize.y = h;
if (rect) if (rect)
{ {
pt.x = m_boundingRect.x; pt.y = m_boundingRect.y;
clientSize.x = m_boundingRect.width; clientSize.y = m_boundingRect.height; clientSize.x = m_boundingRect.width; clientSize.y = m_boundingRect.height;
} }
else else