diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-08-30 02:10:59 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-08-30 02:10:59 +0300 |
commit | 46f0755975033f37eaae9db73c0e2b6499c2a923 (patch) | |
tree | 5c13c361ce4a4e4fd0e07fca1953c54637965666 /src/gui/widgets/dropshortcutcontainer.cpp | |
parent | 1feb7f7edc5f8f383e594b256ef4cab0fae75b99 (diff) | |
download | manaplus-46f0755975033f37eaae9db73c0e2b6499c2a923.tar.gz manaplus-46f0755975033f37eaae9db73c0e2b6499c2a923.tar.bz2 manaplus-46f0755975033f37eaae9db73c0e2b6499c2a923.tar.xz manaplus-46f0755975033f37eaae9db73c0e2b6499c2a923.zip |
Add const to more classes.
Diffstat (limited to 'src/gui/widgets/dropshortcutcontainer.cpp')
-rw-r--r-- | src/gui/widgets/dropshortcutcontainer.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/gui/widgets/dropshortcutcontainer.cpp b/src/gui/widgets/dropshortcutcontainer.cpp index af95ffa82..5adc4e343 100644 --- a/src/gui/widgets/dropshortcutcontainer.cpp +++ b/src/gui/widgets/dropshortcutcontainer.cpp @@ -93,7 +93,7 @@ void DropShortcutContainer::draw(gcn::Graphics *graphics) mBackgroundImg->setAlpha(mAlpha); } - Graphics *g = static_cast<Graphics*>(graphics); + Graphics *const g = static_cast<Graphics*>(graphics); graphics->setFont(getFont()); @@ -106,7 +106,7 @@ void DropShortcutContainer::draw(gcn::Graphics *graphics) } } - Inventory *inv = PlayerInfo::getInventory(); + const Inventory *const inv = PlayerInfo::getInventory(); if (!inv) return; @@ -118,13 +118,13 @@ void DropShortcutContainer::draw(gcn::Graphics *graphics) if (dropShortcut->getItem(i) < 0) continue; - Item *item = inv->findItem(dropShortcut->getItem(i), + const Item *const item = inv->findItem(dropShortcut->getItem(i), dropShortcut->getItemColor(i)); if (item) { // Draw item icon. - Image* image = item->getImage(); + Image *const image = item->getImage(); if (image) { @@ -149,7 +149,7 @@ void DropShortcutContainer::draw(gcn::Graphics *graphics) if (mItemMoved) { // Draw the item image being dragged by the cursor. - Image* image = mItemMoved->getImage(); + const Image *const image = mItemMoved->getImage(); if (image) { const int tPosX = mCursorPosX - (image->mBounds.w / 2); @@ -183,11 +183,11 @@ void DropShortcutContainer::mouseDragged(gcn::MouseEvent &event) if (itemId < 0) return; - Inventory *inv = PlayerInfo::getInventory(); + const Inventory *const inv = PlayerInfo::getInventory(); if (!inv) return; - Item *item = inv->findItem(itemId, itemColor); + Item *const item = inv->findItem(itemId, itemColor); if (item) { @@ -229,11 +229,11 @@ void DropShortcutContainer::mousePressed(gcn::MouseEvent &event) } else if (event.getButton() == gcn::MouseEvent::RIGHT) { - Inventory *inv = PlayerInfo::getInventory(); + const Inventory *const inv = PlayerInfo::getInventory(); if (!inv) return; - Item *item = inv->findItem(dropShortcut->getItem(index), + Item *const item = inv->findItem(dropShortcut->getItem(index), dropShortcut->getItemColor(index)); if (viewport) @@ -286,11 +286,11 @@ void DropShortcutContainer::mouseMoved(gcn::MouseEvent &event) if (itemId < 0) return; - Inventory *inv = PlayerInfo::getInventory(); + const Inventory *const inv = PlayerInfo::getInventory(); if (!inv) return; - Item *item = inv->findItem(itemId, itemColor); + const Item *const item = inv->findItem(itemId, itemColor); if (item && viewport) { |