diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-05-08 22:46:48 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-05-08 22:46:48 +0300 |
commit | 6d4da51f0fdcecc2d4398f60dbca43f499fdbe16 (patch) | |
tree | c71c7c6e49ed36a55c6b6a2b1ba70073300634dd /src/gui/widgets/itemcontainer.cpp | |
parent | 4125ac707288a244a7175b755d74dd963e762f56 (diff) | |
download | mv-6d4da51f0fdcecc2d4398f60dbca43f499fdbe16.tar.gz mv-6d4da51f0fdcecc2d4398f60dbca43f499fdbe16.tar.bz2 mv-6d4da51f0fdcecc2d4398f60dbca43f499fdbe16.tar.xz mv-6d4da51f0fdcecc2d4398f60dbca43f499fdbe16.zip |
Fix code style in gui.
Diffstat (limited to 'src/gui/widgets/itemcontainer.cpp')
-rw-r--r-- | src/gui/widgets/itemcontainer.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp index f24be7737..4a944c276 100644 --- a/src/gui/widgets/itemcontainer.cpp +++ b/src/gui/widgets/itemcontainer.cpp @@ -145,12 +145,13 @@ namespace if (!pair1 || !pair2) return false; - const int t1 = pair1->mItem->getInfo().getType(); - const int t2 = pair2->mItem->getInfo().getType(); + const ItemInfo &info1 = pair1->mItem->getInfo(); + const ItemInfo &info2 = pair2->mItem->getInfo(); + const ItemType t1 = info1.getType(); + const ItemType t2 = info2.getType(); if (t1 == t2) { - return (pair1->mItem->getInfo().getName() - < pair2->mItem->getInfo().getName()); + return (info1.getName() < info2.getName()); } return t1 < t2; } @@ -645,7 +646,7 @@ void ItemContainer::updateMatrix() return; delete []mShowMatrix; - mShowMatrix = new int[mGridRows * mGridColumns]; + mShowMatrix = new int[static_cast<size_t>(mGridRows * mGridColumns)]; std::vector<ItemIdPair*> sortedItems; int i = 0; |