summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-02-09 11:44:37 +0300
committerAndrei Karas <akaras@inbox.ru>2015-02-09 11:44:37 +0300
commit49540a3cac67413e8639ba371782e3635ece74df (patch)
tree1787719bfa551c151be5e72de873a638ad46ab71
parent5427c348b135df91731e60b76015bc4051933e55 (diff)
downloadmv-49540a3cac67413e8639ba371782e3635ece74df.tar.gz
mv-49540a3cac67413e8639ba371782e3635ece74df.tar.bz2
mv-49540a3cac67413e8639ba371782e3635ece74df.tar.xz
mv-49540a3cac67413e8639ba371782e3635ece74df.zip
Fix code style.
-rw-r--r--src/gui/models/shopitems.cpp8
-rw-r--r--src/gui/popups/popupmenu.cpp1
-rw-r--r--src/gui/widgets/itemcontainer.cpp2
-rw-r--r--src/gui/windows/inventorywindow.cpp4
-rw-r--r--src/inventory.cpp1
-rw-r--r--src/net/eathena/buyingstorehandler.cpp8
-rw-r--r--src/net/eathena/vendinghandler.cpp1
-rw-r--r--src/resources/notifications.h3
-rw-r--r--src/utils/xml.h6
9 files changed, 22 insertions, 12 deletions
diff --git a/src/gui/models/shopitems.cpp b/src/gui/models/shopitems.cpp
index 52a0d60b2..1a9b89994 100644
--- a/src/gui/models/shopitems.cpp
+++ b/src/gui/models/shopitems.cpp
@@ -51,10 +51,10 @@ std::string ShopItems::getElementAt(int i)
}
ShopItem *ShopItems::addItem(const int id,
- const int type,
- const unsigned char color,
- const int amount,
- const int price)
+ const int type,
+ const unsigned char color,
+ const int amount,
+ const int price)
{
ShopItem *const item = new ShopItem(-1, id, type, color, amount, price);
mShopItems.push_back(item);
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp
index 48bb4100c..e46f4bec4 100644
--- a/src/gui/popups/popupmenu.cpp
+++ b/src/gui/popups/popupmenu.cpp
@@ -1724,6 +1724,7 @@ void PopupMenu::showPopup(Window *const parent,
case InventoryType::CART:
case InventoryType::TRADE:
case InventoryType::NPC:
+ case InventoryType::VENDING:
case InventoryType::TYPE_END:
default:
break;
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp
index 64c1ad50a..c557b960d 100644
--- a/src/gui/widgets/itemcontainer.cpp
+++ b/src/gui/widgets/itemcontainer.cpp
@@ -427,6 +427,7 @@ void ItemContainer::mousePressed(MouseEvent &event)
src = DRAGDROP_SOURCE_CART;
break;
default:
+ case InventoryType::VENDING:
case InventoryType::TYPE_END:
break;
}
@@ -526,6 +527,7 @@ void ItemContainer::mouseReleased(MouseEvent &event)
dst = DRAGDROP_SOURCE_CART;
break;
default:
+ case InventoryType::VENDING:
case InventoryType::TYPE_END:
break;
}
diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp
index d1ac4ba7b..7bd21e258 100644
--- a/src/gui/windows/inventorywindow.cpp
+++ b/src/gui/windows/inventorywindow.cpp
@@ -120,6 +120,7 @@ InventoryWindow::InventoryWindow(Inventory *const inventory) :
case InventoryType::INVENTORY:
case InventoryType::TRADE:
case InventoryType::NPC:
+ case InventoryType::VENDING:
case InventoryType::TYPE_END:
default:
mSortDropDown->setSelected(config.getIntValue(
@@ -300,6 +301,7 @@ InventoryWindow::InventoryWindow(Inventory *const inventory) :
default:
case InventoryType::TRADE:
case InventoryType::NPC:
+ case InventoryType::VENDING:
case InventoryType::TYPE_END:
break;
};
@@ -356,6 +358,7 @@ void InventoryWindow::storeSortOrder() const
case InventoryType::INVENTORY:
case InventoryType::TRADE:
case InventoryType::NPC:
+ case InventoryType::VENDING:
case InventoryType::TYPE_END:
default:
config.setValue("inventorySortOrder",
@@ -790,6 +793,7 @@ void InventoryWindow::close()
default:
case InventoryType::TRADE:
case InventoryType::NPC:
+ case InventoryType::VENDING:
case InventoryType::TYPE_END:
break;
}
diff --git a/src/inventory.cpp b/src/inventory.cpp
index 7969dfcc3..13b691851 100644
--- a/src/inventory.cpp
+++ b/src/inventory.cpp
@@ -293,6 +293,7 @@ std::string Inventory::getName() const
switch (mType)
{
case InventoryType::INVENTORY:
+ case InventoryType::VENDING:
case InventoryType::TYPE_END:
default:
{
diff --git a/src/net/eathena/buyingstorehandler.cpp b/src/net/eathena/buyingstorehandler.cpp
index e7730c1ca..672c68da3 100644
--- a/src/net/eathena/buyingstorehandler.cpp
+++ b/src/net/eathena/buyingstorehandler.cpp
@@ -28,7 +28,7 @@
#include "net/ea/eaprotocol.h"
#include "net/eathena/messageout.h"
-#include "net/eathena/protocol.h"
+#include "net/eathena/protocol.h"
#include "resources/notifytypes.h"
@@ -194,7 +194,8 @@ void BuyingStoreHandler::processBuyingStoreSellFailed(Net::MessageIn &msg)
}
}
-void BuyingStoreHandler::processBuyingStoreSellerSellFailed(Net::MessageIn &msg)
+void BuyingStoreHandler::processBuyingStoreSellerSellFailed(Net::MessageIn
+ &msg)
{
const int16_t result = msg.readInt16("result");
msg.readInt16("item id");
@@ -213,7 +214,8 @@ void BuyingStoreHandler::processBuyingStoreSellerSellFailed(Net::MessageIn &msg)
NotifyTypes::BUYING_STORE_SELLER_SELL_FAILED_BALANCE);
break;
default:
- NotifyManager::notify(NotifyTypes::BUYING_STORE_SELLER_SELL_FAILED);
+ NotifyManager::notify(
+ NotifyTypes::BUYING_STORE_SELLER_SELL_FAILED);
break;
}
}
diff --git a/src/net/eathena/vendinghandler.cpp b/src/net/eathena/vendinghandler.cpp
index 9e3e00117..f63a35176 100644
--- a/src/net/eathena/vendinghandler.cpp
+++ b/src/net/eathena/vendinghandler.cpp
@@ -132,7 +132,6 @@ void VendingHandler::processHideBoard(Net::MessageIn &msg)
void VendingHandler::processItemsList(Net::MessageIn &msg)
{
-
const int count = (msg.readInt16("len") - 12) / 22;
const int id = msg.readInt32("id");
Being *const being = actorManager->findBeing(id);
diff --git a/src/resources/notifications.h b/src/resources/notifications.h
index 5288a96a0..c0f75aae4 100644
--- a/src/resources/notifications.h
+++ b/src/resources/notifications.h
@@ -460,7 +460,8 @@ namespace NotifyManager
NotifyFlags::EMPTY},
{"buying store sell failed balance",
// TRANSLATORS: notification message
- N_("The trade failed, because the buyer is lacking required balance."),
+ N_("The trade failed, because the buyer is "
+ "lacking required balance."),
NotifyFlags::EMPTY},
{"buying store sell failed",
// TRANSLATORS: notification message
diff --git a/src/utils/xml.h b/src/utils/xml.h
index 41e11c6b6..35e7bb7e6 100644
--- a/src/utils/xml.h
+++ b/src/utils/xml.h
@@ -65,9 +65,9 @@ namespace XML
* Constructor that attempts to load the given file through the
* resource manager. Logs errors.
*/
- explicit Document(const std::string &filename,
- const bool useResman,
- const bool skipError);
+ Document(const std::string &filename,
+ const bool useResman,
+ const bool skipError);
/**
* Constructor that attempts to load an XML document from memory.