1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

- probably fixed 1671

- fixed missing loss condition in Birth of Barbarian
- fixed some bugs found by cppcheck
This commit is contained in:
Ivan Savenko
2014-01-30 11:08:37 +00:00
parent f159f28b9f
commit 3779a54ddd
6 changed files with 68 additions and 16 deletions

View File

@@ -169,19 +169,20 @@ bool CModFilterModel::lessThan(const QModelIndex &left, const QModelIndex &right
{
assert(left.column() == right.column());
CModEntry mod = base->getMod(base->modIndexToName(left.row()));
CModEntry modLeft = base->getMod(base->modIndexToName(left.row()));
CModEntry modRight = base->getMod(base->modIndexToName(left.row()));
switch (left.column())
{
case ModFields::STATUS_ENABLED:
{
return (mod.getModStatus() & (ModStatus::ENABLED | ModStatus::INSTALLED))
< (mod.getModStatus() & (ModStatus::ENABLED | ModStatus::INSTALLED));
return (modLeft.getModStatus() & (ModStatus::ENABLED | ModStatus::INSTALLED))
< (modRight.getModStatus() & (ModStatus::ENABLED | ModStatus::INSTALLED));
}
case ModFields::STATUS_UPDATE:
{
return (mod.getModStatus() & (ModStatus::UPDATEABLE | ModStatus::INSTALLED))
< (mod.getModStatus() & (ModStatus::UPDATEABLE | ModStatus::INSTALLED));
return (modLeft.getModStatus() & (ModStatus::UPDATEABLE | ModStatus::INSTALLED))
< (modRight.getModStatus() & (ModStatus::UPDATEABLE | ModStatus::INSTALLED));
}
default:
{