summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-02-08 00:49:41 +0300
committerAndrei Karas <akaras@inbox.ru>2012-02-08 00:49:41 +0300
commitff5e17ff14a78af31d9d23cd1dfdb5404f9a8fa9 (patch)
tree51a99a43eba0b09ca9e5f554b3676d0308685797 /src/gui
parent538261b13990ee02bbc62d9704233885b15cee04 (diff)
downloadplus-ff5e17ff14a78af31d9d23cd1dfdb5404f9a8fa9.tar.gz
plus-ff5e17ff14a78af31d9d23cd1dfdb5404f9a8fa9.tar.bz2
plus-ff5e17ff14a78af31d9d23cd1dfdb5404f9a8fa9.tar.xz
plus-ff5e17ff14a78af31d9d23cd1dfdb5404f9a8fa9.zip
Fix code style with new tool.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/botcheckerwindow.cpp3
-rw-r--r--src/gui/chatwindow.cpp4
-rw-r--r--src/gui/confirmdialog.cpp1
-rw-r--r--src/gui/debugwindow.cpp2
-rw-r--r--src/gui/itempopup.cpp2
-rw-r--r--src/gui/npcpostdialog.cpp2
-rw-r--r--src/gui/palette.cpp4
-rw-r--r--src/gui/setup_relations.cpp3
-rw-r--r--src/gui/setup_video.cpp2
-rw-r--r--src/gui/statuswindow.cpp2
-rw-r--r--src/gui/textdialog.cpp2
-rw-r--r--src/gui/viewport.h4
-rw-r--r--src/gui/whoisonline.cpp2
-rw-r--r--src/gui/widgets/avatarlistbox.cpp2
-rw-r--r--src/gui/widgets/battletab.h3
-rw-r--r--src/gui/widgets/chattab.cpp2
-rw-r--r--src/gui/widgets/container.cpp2
-rw-r--r--src/gui/widgets/dropdown.h1
-rw-r--r--src/gui/widgets/inventoryfilter.cpp2
-rw-r--r--src/gui/widgets/layout.h4
-rw-r--r--src/gui/widgets/setupitem.cpp1
-rw-r--r--src/gui/widgets/setuptab.cpp2
-rw-r--r--src/gui/widgets/shoplistbox.cpp2
-rw-r--r--src/gui/widgets/slider.cpp1
-rw-r--r--src/gui/widgets/tablemodel.cpp1
-rw-r--r--src/gui/widgets/textfield.cpp22
-rw-r--r--src/gui/widgets/tradetab.h3
27 files changed, 38 insertions, 43 deletions
diff --git a/src/gui/botcheckerwindow.cpp b/src/gui/botcheckerwindow.cpp
index 2043b4fe3..4a092ab55 100644
--- a/src/gui/botcheckerwindow.cpp
+++ b/src/gui/botcheckerwindow.cpp
@@ -53,7 +53,8 @@
#define TIME_COLUMN 1
#define ROW_HEIGHT 12
-// The following column widths really shouldn't be hardcoded but should scale with the size of the widget... excep
+// The following column widths really shouldn't be hardcoded but should
+// scale with the size of the widget... excep
// that, right now, the widget doesn't exactly scale either.
#define NAME_COLUMN_WIDTH 185
#define TIME_COLUMN_WIDTH 70
diff --git a/src/gui/chatwindow.cpp b/src/gui/chatwindow.cpp
index 6831ad5b6..452d2420e 100644
--- a/src/gui/chatwindow.cpp
+++ b/src/gui/chatwindow.cpp
@@ -594,7 +594,7 @@ void ChatWindow::ignoreAllWhispers()
PlayerRelation::IGNORED);
}
- delete(iter->second);
+ delete (iter->second);
iter->second = nullptr;
}
}
@@ -1122,7 +1122,7 @@ std::string ChatWindow::addColors(std::string &msg)
int cMap[] = {1, 4, 5, 2, 3, 6, 7, 9, 0, 8};
// rainbow
- switch(mChatColor)
+ switch (mChatColor)
{
case 11:
msg = removeColors(msg);
diff --git a/src/gui/confirmdialog.cpp b/src/gui/confirmdialog.cpp
index cf9d541ad..22acf5116 100644
--- a/src/gui/confirmdialog.cpp
+++ b/src/gui/confirmdialog.cpp
@@ -112,4 +112,3 @@ void ConfirmDialog::action(const gcn::ActionEvent &event)
scheduleDelete();
}
}
-
diff --git a/src/gui/debugwindow.cpp b/src/gui/debugwindow.cpp
index d13545bea..19db5540a 100644
--- a/src/gui/debugwindow.cpp
+++ b/src/gui/debugwindow.cpp
@@ -396,4 +396,4 @@ void NetDebugTab::logic()
PacketCounters::getInBytes()));
mOutPackets1Label->setCaption(strprintf(_("Out: %d bytes/s"),
PacketCounters::getOutBytes()));
-} \ No newline at end of file
+}
diff --git a/src/gui/itempopup.cpp b/src/gui/itempopup.cpp
index 9a9e5f50d..d96aa564f 100644
--- a/src/gui/itempopup.cpp
+++ b/src/gui/itempopup.cpp
@@ -282,4 +282,4 @@ void ItemPopup::mouseMoved(gcn::MouseEvent &event)
setVisible(false);
mLastName = "";
mLastColor = 1;
-} \ No newline at end of file
+}
diff --git a/src/gui/npcpostdialog.cpp b/src/gui/npcpostdialog.cpp
index 6bcb62baf..b2ffb312c 100644
--- a/src/gui/npcpostdialog.cpp
+++ b/src/gui/npcpostdialog.cpp
@@ -128,4 +128,4 @@ void NpcPostDialog::closeAll()
for (; it != it_end; ++it)
(*it)->close();
-} \ No newline at end of file
+}
diff --git a/src/gui/palette.cpp b/src/gui/palette.cpp
index fe14cd2d4..3b36fa6ce 100644
--- a/src/gui/palette.cpp
+++ b/src/gui/palette.cpp
@@ -39,7 +39,8 @@
const gcn::Color Palette::BLACK = gcn::Color(0, 0, 0);
Palette::Palettes Palette::mInstances;
-const gcn::Color Palette::RAINBOW_COLORS[7] = {
+const gcn::Color Palette::RAINBOW_COLORS[7] =
+{
gcn::Color(255, 0, 0),
gcn::Color(255, 153, 0),
gcn::Color(255, 255, 0),
@@ -48,6 +49,7 @@ const gcn::Color Palette::RAINBOW_COLORS[7] = {
gcn::Color(51, 0, 153),
gcn::Color(153, 0, 153)
};
+
/** Number of Elemets of RAINBOW_COLORS */
const int Palette::RAINBOW_COLOR_COUNT = 7;
diff --git a/src/gui/setup_relations.cpp b/src/gui/setup_relations.cpp
index 571856a14..47d53620c 100644
--- a/src/gui/setup_relations.cpp
+++ b/src/gui/setup_relations.cpp
@@ -50,7 +50,8 @@
#define RELATION_CHOICE_COLUMN 1
#define ROW_HEIGHT 12
-// The following column widths really shouldn't be hardcoded but should scale with the size of the widget... except
+// The following column widths really shouldn't be hardcoded
+// but should scale with the size of the widget... except
// that, right now, the widget doesn't exactly scale either.
#define NAME_COLUMN_WIDTH 230
#define RELATION_CHOICE_COLUMN_WIDTH 80
diff --git a/src/gui/setup_video.cpp b/src/gui/setup_video.cpp
index 9a5b30ea7..6b3d6d4d3 100644
--- a/src/gui/setup_video.cpp
+++ b/src/gui/setup_video.cpp
@@ -743,4 +743,4 @@ void Setup_Video::action(const gcn::ActionEvent &event)
void Setup_Video::externalUpdated()
{
-} \ No newline at end of file
+}
diff --git a/src/gui/statuswindow.cpp b/src/gui/statuswindow.cpp
index 86964383a..3fbec4f35 100644
--- a/src/gui/statuswindow.cpp
+++ b/src/gui/statuswindow.cpp
@@ -286,7 +286,7 @@ void StatusWindow::processEvent(Mana::Channels channel A_UNUSED,
if (event.getName() == Mana::EVENT_UPDATEATTRIBUTE)
{
- switch(event.getInt("id"))
+ switch (event.getInt("id"))
{
case HP: case MAX_HP:
updateHPBar(mHpBar, true);
diff --git a/src/gui/textdialog.cpp b/src/gui/textdialog.cpp
index b30c9eb82..d7d3d5eeb 100644
--- a/src/gui/textdialog.cpp
+++ b/src/gui/textdialog.cpp
@@ -126,4 +126,4 @@ void TextDialog::close()
{
keyboard.setEnabled(mEnabledKeyboard);
scheduleDelete();
-} \ No newline at end of file
+}
diff --git a/src/gui/viewport.h b/src/gui/viewport.h
index f3035b5df..ccb8124ba 100644
--- a/src/gui/viewport.h
+++ b/src/gui/viewport.h
@@ -90,7 +90,9 @@ class Viewport : public WindowContainer, public gcn::MouseListener,
void logic();
/**
- * Toggles whether the path debug graphics are shown. normal, debug with all images and grid, debug with out big images and with out grid.
+ * Toggles whether the path debug graphics are shown. normal,
+ * debug with all images and grid, debug with out big images
+ * and with out grid.
*/
void toggleDebugPath();
diff --git a/src/gui/whoisonline.cpp b/src/gui/whoisonline.cpp
index 205a1aae1..104e4d7f1 100644
--- a/src/gui/whoisonline.cpp
+++ b/src/gui/whoisonline.cpp
@@ -138,7 +138,7 @@ WhoIsOnline::~WhoIsOnline()
mMemoryBuffer = nullptr;
// Remove possibly leftover temporary download
- delete[] mCurlError;
+ delete []mCurlError;
std::set<OnlinePlayer*>::iterator itd = mOnlinePlayers.begin();
std::set<OnlinePlayer*>::iterator itd_end = mOnlinePlayers.end();
diff --git a/src/gui/widgets/avatarlistbox.cpp b/src/gui/widgets/avatarlistbox.cpp
index 2e3472515..822e71805 100644
--- a/src/gui/widgets/avatarlistbox.cpp
+++ b/src/gui/widgets/avatarlistbox.cpp
@@ -403,4 +403,4 @@ void AvatarListBox::optionChanged(const std::string &value)
mShowGender = config.getBoolValue("showgender");
else if (value == "showlevel")
mShowLevel = config.getBoolValue("showlevel");
-} \ No newline at end of file
+}
diff --git a/src/gui/widgets/battletab.h b/src/gui/widgets/battletab.h
index 8d85e739e..2a034a166 100644
--- a/src/gui/widgets/battletab.h
+++ b/src/gui/widgets/battletab.h
@@ -43,6 +43,3 @@ class BattleTab : public ChatTab
extern BattleTab *battleChatTab;
#endif
-
-
-
diff --git a/src/gui/widgets/chattab.cpp b/src/gui/widgets/chattab.cpp
index 6d5dfc9dd..018e35030 100644
--- a/src/gui/widgets/chattab.cpp
+++ b/src/gui/widgets/chattab.cpp
@@ -467,4 +467,4 @@ void ChatTab::addNewRow(std::string &line)
addRow(line);
}
mScrollArea->logic();
-} \ No newline at end of file
+}
diff --git a/src/gui/widgets/container.cpp b/src/gui/widgets/container.cpp
index 80028a62f..106112956 100644
--- a/src/gui/widgets/container.cpp
+++ b/src/gui/widgets/container.cpp
@@ -47,4 +47,4 @@ bool Container::safeRemove(gcn::Widget* widget)
}
}
return false;
-} \ No newline at end of file
+}
diff --git a/src/gui/widgets/dropdown.h b/src/gui/widgets/dropdown.h
index a769678ca..5896042fa 100644
--- a/src/gui/widgets/dropdown.h
+++ b/src/gui/widgets/dropdown.h
@@ -102,4 +102,3 @@ class DropDown : public gcn::DropDown
};
#endif // end DROPDOWN_H
-
diff --git a/src/gui/widgets/inventoryfilter.cpp b/src/gui/widgets/inventoryfilter.cpp
index 216c2bea0..515682cb6 100644
--- a/src/gui/widgets/inventoryfilter.cpp
+++ b/src/gui/widgets/inventoryfilter.cpp
@@ -58,4 +58,4 @@ void InventoryFilter::action(const gcn::ActionEvent &event)
{
(*iter)->action(event);
}
-} \ No newline at end of file
+}
diff --git a/src/gui/widgets/layout.h b/src/gui/widgets/layout.h
index 046d09b59..3c42554b6 100644
--- a/src/gui/widgets/layout.h
+++ b/src/gui/widgets/layout.h
@@ -37,8 +37,8 @@ class LayoutCell;
class ContainerPlacer
{
public:
- ContainerPlacer(gcn::Container *c = nullptr, LayoutCell *l = nullptr):
- mContainer(c), mCell(l)
+ ContainerPlacer(gcn::Container *c = nullptr, LayoutCell *lc = nullptr):
+ mContainer(c), mCell(lc)
{}
/**
diff --git a/src/gui/widgets/setupitem.cpp b/src/gui/widgets/setupitem.cpp
index 059b05ba2..56ce0a25a 100644
--- a/src/gui/widgets/setupitem.cpp
+++ b/src/gui/widgets/setupitem.cpp
@@ -455,7 +455,6 @@ void SetupItemIntTextField::apply(std::string eventName)
}
-
SetupItemLabel::SetupItemLabel(std::string text, std::string description,
SetupTabScroll *parent, bool separator) :
SetupItem(text, description, "", parent, "", "", true),
diff --git a/src/gui/widgets/setuptab.cpp b/src/gui/widgets/setuptab.cpp
index b3863c134..d4ae46eb8 100644
--- a/src/gui/widgets/setuptab.cpp
+++ b/src/gui/widgets/setuptab.cpp
@@ -31,4 +31,4 @@ SetupTab::SetupTab()
void SetupTab::externalUpdated()
{
-} \ No newline at end of file
+}
diff --git a/src/gui/widgets/shoplistbox.cpp b/src/gui/widgets/shoplistbox.cpp
index 71e373d70..ab6400149 100644
--- a/src/gui/widgets/shoplistbox.cpp
+++ b/src/gui/widgets/shoplistbox.cpp
@@ -191,4 +191,4 @@ void ShopListBox::mouseExited(gcn::MouseEvent& mouseEvent A_UNUSED)
return;
mItemPopup->hide();
-} \ No newline at end of file
+}
diff --git a/src/gui/widgets/slider.cpp b/src/gui/widgets/slider.cpp
index ed667e194..c6b57858c 100644
--- a/src/gui/widgets/slider.cpp
+++ b/src/gui/widgets/slider.cpp
@@ -298,4 +298,3 @@ void Slider::mouseExited(gcn::MouseEvent& event A_UNUSED)
{
mHasMouse = false;
}
-
diff --git a/src/gui/widgets/tablemodel.cpp b/src/gui/widgets/tablemodel.cpp
index 5216fb89c..bc5d2ead6 100644
--- a/src/gui/widgets/tablemodel.cpp
+++ b/src/gui/widgets/tablemodel.cpp
@@ -173,4 +173,3 @@ int StaticTableModel::getHeight() const
{
return mColumns * mHeight;
}
-
diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp
index 4dba2eb57..e207b0613 100644
--- a/src/gui/widgets/textfield.cpp
+++ b/src/gui/widgets/textfield.cpp
@@ -208,29 +208,29 @@ void TextField::keyPressed(gcn::KeyEvent &keyEvent)
}
else if (!mMaximum || mText.size() < mMaximum)
{
- int l;
+ int len;
if (val < 128)
- l = 1; // 0xxxxxxx
+ len = 1; // 0xxxxxxx
else if (val < 0x800)
- l = 2; // 110xxxxx 10xxxxxx
+ len = 2; // 110xxxxx 10xxxxxx
else if (val < 0x10000)
- l = 3; // 1110xxxx 10xxxxxx 10xxxxxx
+ len = 3; // 1110xxxx 10xxxxxx 10xxxxxx
else
- l = 4; // 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
+ len = 4; // 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
char buf[4];
- for (int i = 0; i < l; ++i)
+ for (int i = 0; i < len; ++ i)
{
- buf[i] = static_cast<char>(val >> (6 * (l - i - 1)));
+ buf[i] = static_cast<char>(val >> (6 * (len - i - 1)));
if (i > 0)
buf[i] = static_cast<char>((buf[i] & 63) | 128);
}
- if (l > 1)
- buf[0] |= static_cast<char>(255 << (8 - l));
+ if (len > 1)
+ buf[0] |= static_cast<char>(255 << (8 - len));
- mText.insert(mCaretPosition, std::string(buf, buf + l));
- mCaretPosition += l;
+ mText.insert(mCaretPosition, std::string(buf, buf + len));
+ mCaretPosition += len;
}
}
diff --git a/src/gui/widgets/tradetab.h b/src/gui/widgets/tradetab.h
index 06add3ee0..44922c31a 100644
--- a/src/gui/widgets/tradetab.h
+++ b/src/gui/widgets/tradetab.h
@@ -46,6 +46,3 @@ class TradeTab : public ChatTab
extern TradeTab *tradeChatTab;
#endif
-
-
-