summaryrefslogtreecommitdiff
path: root/src/gui/models
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-08-21 22:44:29 +0300
committerAndrei Karas <akaras@inbox.ru>2017-08-21 22:45:15 +0300
commit42f47e483da19079a937c4801ca94bd62d8dc970 (patch)
tree56dc96737e01e04d54357ce7118de3a1f000c516 /src/gui/models
parent2d8b9246c8003f1d32ba396bc19cc11bc5a595b2 (diff)
downloadplus-42f47e483da19079a937c4801ca94bd62d8dc970.tar.gz
plus-42f47e483da19079a937c4801ca94bd62d8dc970.tar.bz2
plus-42f47e483da19079a937c4801ca94bd62d8dc970.tar.xz
plus-42f47e483da19079a937c4801ca94bd62d8dc970.zip
Remove useless else.
Diffstat (limited to 'src/gui/models')
-rw-r--r--src/gui/models/playertablemodel.cpp6
-rw-r--r--src/gui/models/skillmodel.cpp3
-rw-r--r--src/gui/models/worldlistmodel.h5
3 files changed, 4 insertions, 10 deletions
diff --git a/src/gui/models/playertablemodel.cpp b/src/gui/models/playertablemodel.cpp
index 417fafcbc..271b6a5bb 100644
--- a/src/gui/models/playertablemodel.cpp
+++ b/src/gui/models/playertablemodel.cpp
@@ -68,8 +68,7 @@ int PlayerTableModel::getRows() const
{
if (mPlayers != nullptr)
return CAST_S32(mPlayers->size());
- else
- return 0;
+ return 0;
}
int PlayerTableModel::getColumns() const
@@ -86,8 +85,7 @@ int PlayerTableModel::getColumnWidth(const int index) const
{
if (index == NAME_COLUMN)
return NAME_COLUMN_WIDTH;
- else
- return RELATION_CHOICE_COLUMN_WIDTH;
+ return RELATION_CHOICE_COLUMN_WIDTH;
}
void PlayerTableModel::playerRelationsUpdated()
diff --git a/src/gui/models/skillmodel.cpp b/src/gui/models/skillmodel.cpp
index 0dcf9cedd..4d22280d8 100644
--- a/src/gui/models/skillmodel.cpp
+++ b/src/gui/models/skillmodel.cpp
@@ -47,8 +47,7 @@ std::string SkillModel::getElementAt(int i)
const SkillInfo *const info = getSkillAt(i);
if (info != nullptr)
return info->data->name;
- else
- return std::string();
+ return std::string();
}
void SkillModel::updateVisibilities()
diff --git a/src/gui/models/worldlistmodel.h b/src/gui/models/worldlistmodel.h
index 9ae5a5e22..3be179c61 100644
--- a/src/gui/models/worldlistmodel.h
+++ b/src/gui/models/worldlistmodel.h
@@ -59,10 +59,7 @@ class WorldListModel final : public ListModel
return std::string(si->name).append(" (").append(
toString(si->online_users)).append(")");
}
- else
- {
- return "???";
- }
+ return "???";
}
private:
Worlds mWorlds;