summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-08-16 20:43:05 +0300
committerAndrei Karas <akaras@inbox.ru>2013-08-16 20:43:05 +0300
commit381a271357c727df838ffe7958bf6ae16fd69804 (patch)
tree8ad1d9e05d7bc6b402ca31711309b649bd6eff8a
parent44ca1b1c650e08e45de738b19513136e71e40349 (diff)
downloadplus-381a271357c727df838ffe7958bf6ae16fd69804.tar.gz
plus-381a271357c727df838ffe7958bf6ae16fd69804.tar.bz2
plus-381a271357c727df838ffe7958bf6ae16fd69804.tar.xz
plus-381a271357c727df838ffe7958bf6ae16fd69804.zip
fix code style.
-rw-r--r--src/dragdrop.h2
-rw-r--r--src/gui/npcdialog.cpp11
-rw-r--r--src/gui/socialwindow.cpp2
-rw-r--r--src/gui/widgets/colorpage.cpp5
-rw-r--r--src/net/tmwa/npchandler.cpp2
-rw-r--r--src/utils/copynpaste.cpp2
6 files changed, 15 insertions, 9 deletions
diff --git a/src/dragdrop.h b/src/dragdrop.h
index aaad56b2d..e083e33ec 100644
--- a/src/dragdrop.h
+++ b/src/dragdrop.h
@@ -44,7 +44,7 @@ enum DragDropSource
DRAGDROP_SOURCE_DROP,
DRAGDROP_SOURCE_SHORTCUTS,
DRAGDROP_SOURCE_CRAFT,
- DRAGDROP_SOURCE_NPC,
+ DRAGDROP_SOURCE_NPC
};
class DragDrop
diff --git a/src/gui/npcdialog.cpp b/src/gui/npcdialog.cpp
index 29d6383f9..576db564b 100644
--- a/src/gui/npcdialog.cpp
+++ b/src/gui/npcdialog.cpp
@@ -306,8 +306,7 @@ void NpcDialog::action(const gcn::ActionEvent &event)
{
std::string printText; // Text that will get printed
// in the textbox
-
- switch(mInputState)
+ switch (mInputState)
{
case NPC_INPUT_LIST:
{
@@ -366,6 +365,7 @@ void NpcDialog::action(const gcn::ActionEvent &event)
break;
}
+ case NPC_INPUT_NONE:
default:
break;
}
@@ -393,6 +393,8 @@ void NpcDialog::action(const gcn::ActionEvent &event)
case NPC_INPUT_ITEM:
mInventory->clear();
break;
+ case NPC_INPUT_NONE:
+ case NPC_INPUT_LIST:
default:
break;
}
@@ -414,6 +416,8 @@ void NpcDialog::action(const gcn::ActionEvent &event)
break;
case NPC_INPUT_STRING:
case NPC_INPUT_INTEGER:
+ case NPC_INPUT_LIST:
+ case NPC_INPUT_NONE:
default:
clearRows();
break;
@@ -430,6 +434,8 @@ void NpcDialog::action(const gcn::ActionEvent &event)
break;
case NPC_INPUT_STRING:
case NPC_INPUT_INTEGER:
+ case NPC_INPUT_NONE:
+ case NPC_INPUT_LIST:
default:
Net::getNpcHandler()->listInput(mNpcId, 255);
break;
@@ -785,6 +791,7 @@ void NpcDialog::buildLayout()
placeItemInputControls();
break;
+ case NPC_INPUT_NONE:
default:
break;
}
diff --git a/src/gui/socialwindow.cpp b/src/gui/socialwindow.cpp
index 08e4b6f44..c182df9ab 100644
--- a/src/gui/socialwindow.cpp
+++ b/src/gui/socialwindow.cpp
@@ -261,7 +261,7 @@ public:
mConfirmDialog->addActionListener(this);
}
- void buildCounter(const int online0 A_UNUSED, const int total0 A_UNUSED)
+ void buildCounter(const int online0, const int total0)
{
if (online0 || total0)
{
diff --git a/src/gui/widgets/colorpage.cpp b/src/gui/widgets/colorpage.cpp
index bd37dbeeb..3673f9e9f 100644
--- a/src/gui/widgets/colorpage.cpp
+++ b/src/gui/widgets/colorpage.cpp
@@ -32,14 +32,13 @@ ColorPage::ColorPage(const Widget2 *const widget,
gcn::ListModel *const listModel,
const std::string &skin) :
ListBox(widget, listModel, skin),
- mItemPadding(mSkin ? mSkin->getOption("itemPadding") : 1)
+ mItemPadding(mSkin ? mSkin->getOption("itemPadding") : 1),
+ mRowHeight(13)
{
// addMouseListener(this);
const gcn::Font *const font = getFont();
if (font)
mRowHeight = font->getHeight() + 2 * mItemPadding;
- else
- mRowHeight = 13;
adjustSize();
}
diff --git a/src/net/tmwa/npchandler.cpp b/src/net/tmwa/npchandler.cpp
index 7bdf671a4..e22036619 100644
--- a/src/net/tmwa/npchandler.cpp
+++ b/src/net/tmwa/npchandler.cpp
@@ -318,7 +318,7 @@ void NpcHandler::processNpcCommand(Net::MessageIn &msg, const int npcId)
if (mDialog)
mDialog->clearRows();
break;
- case 10: // send selected item id
+ case 10: // send selected item id
if (mDialog)
mDialog->itemRequest();
break;
diff --git a/src/utils/copynpaste.cpp b/src/utils/copynpaste.cpp
index 8af847a21..b2d241f16 100644
--- a/src/utils/copynpaste.cpp
+++ b/src/utils/copynpaste.cpp
@@ -35,7 +35,7 @@
#include "utils/copynpaste.h"
-#include <SDL/SDL_syswm.h>
+#include <SDL_syswm.h>
#include "debug.h"