diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-02-07 16:18:13 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-02-07 16:18:13 +0300 |
commit | 9fe21fcd8883b37bdc30224822e6e42afb35b8f0 (patch) | |
tree | 798117abd4dc7e610997d59d530a96ddc1509f53 /src/gui/models/playertablemodel.cpp | |
parent | 4429cb14e9e187edef27aba692a4266733f79c17 (diff) | |
download | mv-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.gz mv-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.bz2 mv-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.xz mv-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.zip |
Replace most static_cast<Type> to shorter versions from defines.
Diffstat (limited to 'src/gui/models/playertablemodel.cpp')
-rw-r--r-- | src/gui/models/playertablemodel.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/models/playertablemodel.cpp b/src/gui/models/playertablemodel.cpp index c4a438c4c..80eab3694 100644 --- a/src/gui/models/playertablemodel.cpp +++ b/src/gui/models/playertablemodel.cpp @@ -67,7 +67,7 @@ PlayerTableModel::~PlayerTableModel() int PlayerTableModel::getRows() const { if (mPlayers) - return static_cast<int>(mPlayers->size()); + return CAST_S32(mPlayers->size()); else return 0; } @@ -100,7 +100,7 @@ void PlayerTableModel::playerRelationsUpdated() mPlayers = player_names; // set up widgets - for (unsigned int r = 0, sz = static_cast<unsigned int>( + for (unsigned int r = 0, sz = CAST_U32( player_names->size()); r < sz; ++r) { const std::string name = (*player_names)[r]; @@ -108,7 +108,7 @@ void PlayerTableModel::playerRelationsUpdated() mWidgets.push_back(widget); DropDown *const choicebox = new DropDown(this, mListModel); - choicebox->setSelected(static_cast<int>( + choicebox->setSelected(CAST_S32( player_relations.getRelation(name))); mWidgets.push_back(choicebox); } @@ -140,7 +140,7 @@ void PlayerTableModel::freeWidgets() std::string PlayerTableModel::getPlayerAt(const int index) const { if (!mPlayers || index < 0 - || index >= static_cast<signed>(mPlayers->size())) + || index >= CAST_S32(mPlayers->size())) { return std::string(); } |