summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2016-09-30 03:16:43 -0400
committerLioncash <mathew1800@gmail.com>2016-09-30 07:13:14 -0400
commitd8e4d5f0358e4098547f0ddea18f13f055b2e810 (patch)
treeaabe17ecbe475ce21e6872fa8953e2652e2f382f /Source
parent6e0e4646bd37d88820a4b52a5896a7078d6521ec (diff)
GameListCtrl: eliminate redundant elses
These aren't necessary considering the above condition returns
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/DolphinWX/GameListCtrl.cpp26
1 files changed, 11 insertions, 15 deletions
diff --git a/Source/Core/DolphinWX/GameListCtrl.cpp b/Source/Core/DolphinWX/GameListCtrl.cpp
index 0656209c72..39ed2d4e9d 100644
--- a/Source/Core/DolphinWX/GameListCtrl.cpp
+++ b/Source/Core/DolphinWX/GameListCtrl.cpp
@@ -715,8 +715,8 @@ const GameListItem* CGameListCtrl::GetISO(size_t index) const
{
if (index < m_ISOFiles.size())
return m_ISOFiles[index].get();
- else
- return nullptr;
+
+ return nullptr;
}
static CGameListCtrl* caller;
@@ -983,21 +983,17 @@ void CGameListCtrl::OnRightClick(wxMouseEvent& event)
const GameListItem* CGameListCtrl::GetSelectedISO() const
{
- if (m_ISOFiles.size() == 0)
- {
+ if (m_ISOFiles.empty())
return nullptr;
- }
- else if (GetSelectedItemCount() == 0)
- {
+
+ if (GetSelectedItemCount() == 0)
return nullptr;
- }
- else
- {
- long item = GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
- if (item == wxNOT_FOUND)
- return nullptr;
- return m_ISOFiles[GetItemData(item)].get();
- }
+
+ long item = GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
+ if (item == wxNOT_FOUND)
+ return nullptr;
+
+ return m_ISOFiles[GetItemData(item)].get();
}
std::vector<const GameListItem*> CGameListCtrl::GetAllSelectedISOs() const