diff options
| author | Tannin <sherb@gmx.net> | 2016-05-07 00:03:38 +0200 |
|---|---|---|
| committer | Tannin <sherb@gmx.net> | 2016-05-07 00:03:38 +0200 |
| commit | eb97c46ed68a965d6ddf44fa6741fa929fd7d278 (patch) | |
| tree | f2c92e8a688faacdbd6285ac5b5bf5f91a5ee3e9 /src/modflagicondelegate.cpp | |
| parent | d958e11e2b3cde75f481bdb734be10b4e1dda585 (diff) | |
cleanup
Diffstat (limited to 'src/modflagicondelegate.cpp')
| -rw-r--r-- | src/modflagicondelegate.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modflagicondelegate.cpp b/src/modflagicondelegate.cpp index d66c3ac5..5c4167ad 100644 --- a/src/modflagicondelegate.cpp +++ b/src/modflagicondelegate.cpp @@ -58,7 +58,7 @@ size_t ModFlagIconDelegate::getNumIcons(const QModelIndex &index) const if (modIdx < ModInfo::getNumMods()) {
ModInfo::Ptr info = ModInfo::getByIndex(modIdx);
std::vector<ModInfo::EFlag> flags = info->getFlags();
- int count = flags.size();
+ size_t count = flags.size();
if (std::find_first_of(flags.begin(), flags.end(), m_ConflictFlags, m_ConflictFlags + 4) == flags.end()) {
++count;
}
@@ -71,11 +71,11 @@ size_t ModFlagIconDelegate::getNumIcons(const QModelIndex &index) const QSize ModFlagIconDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &modelIndex) const
{
- int count = getNumIcons(modelIndex);
+ size_t count = getNumIcons(modelIndex);
unsigned int index = modelIndex.data(Qt::UserRole + 1).toInt();
QSize result;
if (index < ModInfo::getNumMods()) {
- result = QSize(count * 40, 20);
+ result = QSize(static_cast<int>(count) * 40, 20);
} else {
result = QSize(1, 20);
}
|
