summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-04-14 17:06:02 +0300
committerAndrei Karas <akaras@inbox.ru>2013-04-14 17:06:02 +0300
commit6b5c7e7a5ed32abfc98d9acdebacc50c68a91a1d (patch)
treef1acb027394af1aec49790354df97da4665488b7 /src/gui/widgets
parenta7d7346b9eb3fa62a8912e31d5c00f8e05390425 (diff)
downloadmanaplus-6b5c7e7a5ed32abfc98d9acdebacc50c68a91a1d.tar.gz
manaplus-6b5c7e7a5ed32abfc98d9acdebacc50c68a91a1d.tar.bz2
manaplus-6b5c7e7a5ed32abfc98d9acdebacc50c68a91a1d.tar.xz
manaplus-6b5c7e7a5ed32abfc98d9acdebacc50c68a91a1d.zip
another fixes from cpplint.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/battletab.h2
-rw-r--r--src/gui/widgets/browserbox.h2
-rw-r--r--src/gui/widgets/button.h2
-rw-r--r--src/gui/widgets/chattab.h2
-rw-r--r--src/gui/widgets/container.h2
-rw-r--r--src/gui/widgets/desktop.h4
-rw-r--r--src/gui/widgets/dropdown.h3
-rw-r--r--src/gui/widgets/flowcontainer.cpp2
-rw-r--r--src/gui/widgets/gmtab.h4
-rw-r--r--src/gui/widgets/guitable.h7
-rw-r--r--src/gui/widgets/icon.h2
-rw-r--r--src/gui/widgets/itemshortcutcontainer.h2
-rw-r--r--src/gui/widgets/label.h2
-rw-r--r--src/gui/widgets/layout.h8
-rw-r--r--src/gui/widgets/layouthelper.h4
-rw-r--r--src/gui/widgets/playerbox.h2
-rw-r--r--src/gui/widgets/progressindicator.h2
-rw-r--r--src/gui/widgets/radiobutton.h2
-rw-r--r--src/gui/widgets/setuptab.h2
-rw-r--r--src/gui/widgets/setuptabscroll.h2
-rw-r--r--src/gui/widgets/shopitems.h4
-rw-r--r--src/gui/widgets/shoplistbox.h2
-rw-r--r--src/gui/widgets/slider.h2
-rw-r--r--src/gui/widgets/sliderlist.h2
-rw-r--r--src/gui/widgets/spellshortcutcontainer.h2
-rw-r--r--src/gui/widgets/tab.h2
-rw-r--r--src/gui/widgets/tabbedarea.cpp4
-rw-r--r--src/gui/widgets/tabbedarea.h2
-rw-r--r--src/gui/widgets/tablemodel.h2
-rw-r--r--src/gui/widgets/textbox.h2
-rw-r--r--src/gui/widgets/tradetab.h2
-rw-r--r--src/gui/widgets/whispertab.h2
-rw-r--r--src/gui/widgets/widget2.h2
-rw-r--r--src/gui/widgets/windowcontainer.h2
34 files changed, 43 insertions, 47 deletions
diff --git a/src/gui/widgets/battletab.h b/src/gui/widgets/battletab.h
index 7bcb78d28..83828f744 100644
--- a/src/gui/widgets/battletab.h
+++ b/src/gui/widgets/battletab.h
@@ -31,7 +31,7 @@
class BattleTab final : public ChatTab
{
public:
- BattleTab(const Widget2 *const widget);
+ explicit BattleTab(const Widget2 *const widget);
A_DELETE_COPY(BattleTab)
diff --git a/src/gui/widgets/browserbox.h b/src/gui/widgets/browserbox.h
index 045e0d5d5..304fa1e6c 100644
--- a/src/gui/widgets/browserbox.h
+++ b/src/gui/widgets/browserbox.h
@@ -126,7 +126,7 @@ class BrowserBox final : public gcn::Widget,
* Sets the maximum numbers of rows in the browser box. 0 = no limit.
*/
void setMaxRow(unsigned max)
- { mMaxRows = max; };
+ { mMaxRows = max; }
/**
* Adds a text row to the browser.
diff --git a/src/gui/widgets/button.h b/src/gui/widgets/button.h
index d0431217e..90faa7d06 100644
--- a/src/gui/widgets/button.h
+++ b/src/gui/widgets/button.h
@@ -52,7 +52,7 @@ class Button final : public gcn::Button,
/**
* Default constructor.
*/
- Button(const Widget2 *const widget);
+ explicit Button(const Widget2 *const widget);
/**
* Constructor, sets the caption of the button to the given string and
diff --git a/src/gui/widgets/chattab.h b/src/gui/widgets/chattab.h
index 7105f3fc4..7f27615ae 100644
--- a/src/gui/widgets/chattab.h
+++ b/src/gui/widgets/chattab.h
@@ -209,4 +209,4 @@ class ChatTab : public Tab
extern ChatTab *localChatTab;
extern ChatTab *debugChatTab;
-#endif // CHATTAB_H
+#endif // CHATTAB_H
diff --git a/src/gui/widgets/container.h b/src/gui/widgets/container.h
index eb1d9b8e4..60da54672 100644
--- a/src/gui/widgets/container.h
+++ b/src/gui/widgets/container.h
@@ -45,7 +45,7 @@ class Container : public gcn::Container,
public Widget2
{
public:
- Container(const Widget2 *const widget);
+ explicit Container(const Widget2 *const widget);
~Container();
diff --git a/src/gui/widgets/desktop.h b/src/gui/widgets/desktop.h
index 9bafc0552..d08127630 100644
--- a/src/gui/widgets/desktop.h
+++ b/src/gui/widgets/desktop.h
@@ -47,7 +47,7 @@ class Label;
class Desktop final : public Container, private gcn::WidgetListener
{
public:
- Desktop(const Widget2 *const widget);
+ explicit Desktop(const Widget2 *const widget);
A_DELETE_COPY(Desktop)
@@ -71,4 +71,4 @@ class Desktop final : public Container, private gcn::WidgetListener
gcn::Color mBackgroundGrayColor;
};
-#endif // DESKTOP_H
+#endif // DESKTOP_H
diff --git a/src/gui/widgets/dropdown.h b/src/gui/widgets/dropdown.h
index 30ce6692b..a145d708c 100644
--- a/src/gui/widgets/dropdown.h
+++ b/src/gui/widgets/dropdown.h
@@ -157,7 +157,6 @@ class DropDown final : public gcn::ActionListener,
bool mDroppedDown;
bool mPushed;
int mFoldedUpHeight;
-// gcn::FocusHandler mInternalFocusHandler;
bool mIsDragged;
typedef std::list<SelectionListener*> SelectionListenerList;
SelectionListenerList mSelectionListeners;
@@ -171,4 +170,4 @@ class DropDown final : public gcn::ActionListener,
static Skin *mSkin;
};
-#endif // end DROPDOWN_H
+#endif // end DROPDOWN_H
diff --git a/src/gui/widgets/flowcontainer.cpp b/src/gui/widgets/flowcontainer.cpp
index dda201904..80a746dd4 100644
--- a/src/gui/widgets/flowcontainer.cpp
+++ b/src/gui/widgets/flowcontainer.cpp
@@ -92,5 +92,5 @@ void FlowContainer::add(gcn::Widget *widget)
Container::add(widget);
widget->setSize(mBoxWidth, mBoxHeight);
- widgetResized(nullptr);
+ widgetResized(gcn::Event(nullptr));
}
diff --git a/src/gui/widgets/gmtab.h b/src/gui/widgets/gmtab.h
index f0ebc7e76..cadadca7e 100644
--- a/src/gui/widgets/gmtab.h
+++ b/src/gui/widgets/gmtab.h
@@ -29,7 +29,7 @@
class GmTab final : public ChatTab
{
public:
- GmTab(const Widget2 *const widget);
+ explicit GmTab(const Widget2 *const widget);
A_DELETE_COPY(GmTab)
@@ -50,4 +50,4 @@ class GmTab final : public ChatTab
extern GmTab *gmChatTab;
-#endif // GMTAB_H
+#endif // GMTAB_H
diff --git a/src/gui/widgets/guitable.h b/src/gui/widgets/guitable.h
index 0b2b4462c..08e319588 100644
--- a/src/gui/widgets/guitable.h
+++ b/src/gui/widgets/guitable.h
@@ -165,8 +165,8 @@ protected:
virtual int getColumnWidth(int i) const A_WARN_UNUSED;
private:
- int getRowForY(int y) const A_WARN_UNUSED; // -1 on error
- int getColumnForX(int x) const A_WARN_UNUSED; // -1 on error
+ int getRowForY(int y) const A_WARN_UNUSED; // -1 on error
+ int getColumnForX(int x) const A_WARN_UNUSED; // -1 on error
void recomputeDimensions();
bool mLinewiseMode;
bool mWrappingEnabled;
@@ -193,5 +193,4 @@ private:
gcn::Color mHighlightColor;
};
-
-#endif // TABLE_H
+#endif // TABLE_H
diff --git a/src/gui/widgets/icon.h b/src/gui/widgets/icon.h
index 7d681dd8b..bae76bb72 100644
--- a/src/gui/widgets/icon.h
+++ b/src/gui/widgets/icon.h
@@ -74,4 +74,4 @@ class Icon final : public gcn::Widget,
Image *mImage;
};
-#endif // ICON_H
+#endif // ICON_H
diff --git a/src/gui/widgets/itemshortcutcontainer.h b/src/gui/widgets/itemshortcutcontainer.h
index 47a520601..a416f52c4 100644
--- a/src/gui/widgets/itemshortcutcontainer.h
+++ b/src/gui/widgets/itemshortcutcontainer.h
@@ -43,7 +43,7 @@ class ItemShortcutContainer final : public ShortcutContainer
/**
* Constructor. Initializes the graphic.
*/
- ItemShortcutContainer(const unsigned number);
+ explicit ItemShortcutContainer(const unsigned number);
A_DELETE_COPY(ItemShortcutContainer)
diff --git a/src/gui/widgets/label.h b/src/gui/widgets/label.h
index 6c7df3f89..39146ffd2 100644
--- a/src/gui/widgets/label.h
+++ b/src/gui/widgets/label.h
@@ -42,7 +42,7 @@ class Label final : public gcn::Label, public Widget2
/**
* Constructor.
*/
- Label(const Widget2 *const widget);
+ explicit Label(const Widget2 *const widget);
/**
* Constructor. This version of the constructor sets the label with an
diff --git a/src/gui/widgets/layout.h b/src/gui/widgets/layout.h
index cb0000073..267e8da6e 100644
--- a/src/gui/widgets/layout.h
+++ b/src/gui/widgets/layout.h
@@ -72,7 +72,6 @@ class LayoutArray final
friend class LayoutCell;
public:
-
LayoutArray();
~LayoutArray();
@@ -121,9 +120,8 @@ class LayoutArray final
void reflow(const int nX, const int nY, const int nW, const int nH);
private:
-
// Copy not allowed, as the array owns all its cells.
- LayoutArray(LayoutArray const &);
+ explicit LayoutArray(LayoutArray const &);
LayoutArray &operator=(LayoutArray const &);
/**
@@ -289,7 +287,7 @@ class LayoutCell
private:
// Copy not allowed, as the cell may own an array.
- LayoutCell(LayoutCell const &);
+ explicit LayoutCell(LayoutCell const &);
LayoutCell &operator=(LayoutCell const &);
union
@@ -365,4 +363,4 @@ class Layout final : public LayoutCell
bool mComputed;
};
-#endif // WIDGET_LAYOUT_H
+#endif // WIDGET_LAYOUT_H
diff --git a/src/gui/widgets/layouthelper.h b/src/gui/widgets/layouthelper.h
index 57448ec01..fea4efdd6 100644
--- a/src/gui/widgets/layouthelper.h
+++ b/src/gui/widgets/layouthelper.h
@@ -38,7 +38,7 @@ class LayoutHelper final : public gcn::WidgetListener
/**
* Constructor.
*/
- LayoutHelper(gcn::Container *const container);
+ explicit LayoutHelper(gcn::Container *const container);
A_DELETE_COPY(LayoutHelper)
@@ -85,4 +85,4 @@ class LayoutHelper final : public gcn::WidgetListener
gcn::Container *mContainer; /**< Managed container */
};
-#endif // LAYOUTHELPER_H
+#endif // LAYOUTHELPER_H
diff --git a/src/gui/widgets/playerbox.h b/src/gui/widgets/playerbox.h
index 8526117a9..61ad7dae4 100644
--- a/src/gui/widgets/playerbox.h
+++ b/src/gui/widgets/playerbox.h
@@ -48,7 +48,7 @@ class PlayerBox final : public Widget2,
*/
PlayerBox(Being *const being, const std::string &skin = "");
- PlayerBox(std::string skin = "");
+ explicit PlayerBox(std::string skin = "");
A_DELETE_COPY(PlayerBox)
diff --git a/src/gui/widgets/progressindicator.h b/src/gui/widgets/progressindicator.h
index 1fc1dcd37..da80f59ec 100644
--- a/src/gui/widgets/progressindicator.h
+++ b/src/gui/widgets/progressindicator.h
@@ -52,4 +52,4 @@ class ProgressIndicator final : public gcn::Widget,
SimpleAnimation *mIndicator;
};
-#endif // PROGRESSINDICATOR_H
+#endif // PROGRESSINDICATOR_H
diff --git a/src/gui/widgets/radiobutton.h b/src/gui/widgets/radiobutton.h
index 860ede73e..481d18408 100644
--- a/src/gui/widgets/radiobutton.h
+++ b/src/gui/widgets/radiobutton.h
@@ -90,4 +90,4 @@ class RadioButton final : public gcn::RadioButton,
int mSpacing;
};
-#endif // RADIOBUTTON_H
+#endif // RADIOBUTTON_H
diff --git a/src/gui/widgets/setuptab.h b/src/gui/widgets/setuptab.h
index 7d0c45d17..a388daf82 100644
--- a/src/gui/widgets/setuptab.h
+++ b/src/gui/widgets/setuptab.h
@@ -40,7 +40,7 @@ class SetupTab : public Container,
public gcn::WidgetListener
{
public:
- SetupTab(const Widget2 *const widget);
+ explicit SetupTab(const Widget2 *const widget);
A_DELETE_COPY(SetupTab)
diff --git a/src/gui/widgets/setuptabscroll.h b/src/gui/widgets/setuptabscroll.h
index 2417bd400..e177ba6cb 100644
--- a/src/gui/widgets/setuptabscroll.h
+++ b/src/gui/widgets/setuptabscroll.h
@@ -35,7 +35,7 @@ class VertContainer;
class SetupTabScroll : public SetupTab
{
public:
- SetupTabScroll(const Widget2 *const widget);
+ explicit SetupTabScroll(const Widget2 *const widget);
A_DELETE_COPY(SetupTabScroll)
diff --git a/src/gui/widgets/shopitems.h b/src/gui/widgets/shopitems.h
index 954f2830a..e577916a2 100644
--- a/src/gui/widgets/shopitems.h
+++ b/src/gui/widgets/shopitems.h
@@ -50,7 +50,7 @@ class ShopItems final : public gcn::ListModel
* @param mergeDuplicates lets the Shop look for duplicate entries and
* merges them to one item.
*/
- ShopItems(const bool mergeDuplicates = false);
+ explicit ShopItems(const bool mergeDuplicates = false);
A_DELETE_COPY(ShopItems)
@@ -138,4 +138,4 @@ class ShopItems final : public gcn::ListModel
bool mMergeDuplicates;
};
-#endif // SHOPITEMS_H
+#endif // SHOPITEMS_H
diff --git a/src/gui/widgets/shoplistbox.h b/src/gui/widgets/shoplistbox.h
index ad58ea413..5bc63ca85 100644
--- a/src/gui/widgets/shoplistbox.h
+++ b/src/gui/widgets/shoplistbox.h
@@ -106,4 +106,4 @@ class ShopListBox final : public ListBox
static float mAlpha;
};
-#endif // SHOPLISTBOX_H
+#endif // SHOPLISTBOX_H
diff --git a/src/gui/widgets/slider.h b/src/gui/widgets/slider.h
index a6c608214..f1cc5b1b0 100644
--- a/src/gui/widgets/slider.h
+++ b/src/gui/widgets/slider.h
@@ -44,7 +44,7 @@ class Slider final : public gcn::Slider,
/**
* Constructor with scale start equal to 0.
*/
- Slider(const double scaleEnd = 1.0);
+ explicit Slider(const double scaleEnd = 1.0);
/**
* Constructor.
diff --git a/src/gui/widgets/sliderlist.h b/src/gui/widgets/sliderlist.h
index b07ca5598..4a0a9b351 100644
--- a/src/gui/widgets/sliderlist.h
+++ b/src/gui/widgets/sliderlist.h
@@ -83,4 +83,4 @@ class SliderList final : public Container,
int mSelectedIndex;
};
-#endif // end GUI_WIDGETS_SLIDERLIST_H
+#endif // end GUI_WIDGETS_SLIDERLIST_H
diff --git a/src/gui/widgets/spellshortcutcontainer.h b/src/gui/widgets/spellshortcutcontainer.h
index f879922ee..62a970c79 100644
--- a/src/gui/widgets/spellshortcutcontainer.h
+++ b/src/gui/widgets/spellshortcutcontainer.h
@@ -42,7 +42,7 @@ class SpellShortcutContainer final : public ShortcutContainer
/**
* Constructor. Initializes the graphic.
*/
- SpellShortcutContainer(const unsigned number);
+ explicit SpellShortcutContainer(const unsigned number);
A_DELETE_COPY(SpellShortcutContainer)
diff --git a/src/gui/widgets/tab.h b/src/gui/widgets/tab.h
index c1a9d37f2..40f47f6ff 100644
--- a/src/gui/widgets/tab.h
+++ b/src/gui/widgets/tab.h
@@ -47,7 +47,7 @@ class Tab : public gcn::BasicContainer,
public gcn::WidgetListener
{
public:
- Tab(const Widget2 *const widget);
+ explicit Tab(const Widget2 *const widget);
A_DELETE_COPY(Tab)
diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp
index e31d4f6cd..3eb09a113 100644
--- a/src/gui/widgets/tabbedarea.cpp
+++ b/src/gui/widgets/tabbedarea.cpp
@@ -65,7 +65,7 @@ TabbedArea::TabbedArea(const Widget2 *const widget) :
mArrowButton[0] = new Button(this, "<", "shift_left", this);
mArrowButton[1] = new Button(this, ">", "shift_right", this);
- widgetResized(nullptr);
+ widgetResized(gcn::Event(nullptr));
}
TabbedArea::~TabbedArea()
@@ -329,7 +329,7 @@ void TabbedArea::setSelectedTab(Tab *tab)
if (newTab)
newTab->setCurrent();
- widgetResized(nullptr);
+ widgetResized(gcn::Event(nullptr));
}
int TabbedArea::getSelectedTabIndex() const
diff --git a/src/gui/widgets/tabbedarea.h b/src/gui/widgets/tabbedarea.h
index 7c90f19ea..40c60bd49 100644
--- a/src/gui/widgets/tabbedarea.h
+++ b/src/gui/widgets/tabbedarea.h
@@ -48,7 +48,7 @@ class TabbedArea final : public Widget2,
/**
* Constructor.
*/
- TabbedArea(const Widget2 *const widget);
+ explicit TabbedArea(const Widget2 *const widget);
A_DELETE_COPY(TabbedArea)
diff --git a/src/gui/widgets/tablemodel.h b/src/gui/widgets/tablemodel.h
index da200c52a..7e061efb1 100644
--- a/src/gui/widgets/tablemodel.h
+++ b/src/gui/widgets/tablemodel.h
@@ -159,4 +159,4 @@ protected:
std::vector<int> mWidths;
};
-#endif // TABLE_MODEL_H
+#endif // TABLE_MODEL_H
diff --git a/src/gui/widgets/textbox.h b/src/gui/widgets/textbox.h
index 1ec11311a..327a7a900 100644
--- a/src/gui/widgets/textbox.h
+++ b/src/gui/widgets/textbox.h
@@ -43,7 +43,7 @@ class TextBox final : public gcn::TextBox,
/**
* Constructor.
*/
- TextBox(const Widget2 *const widget);
+ explicit TextBox(const Widget2 *const widget);
A_DELETE_COPY(TextBox)
diff --git a/src/gui/widgets/tradetab.h b/src/gui/widgets/tradetab.h
index 19d85a645..c790a42bb 100644
--- a/src/gui/widgets/tradetab.h
+++ b/src/gui/widgets/tradetab.h
@@ -31,7 +31,7 @@
class TradeTab final : public ChatTab
{
public:
- TradeTab(const Widget2 *const widget);
+ explicit TradeTab(const Widget2 *const widget);
A_DELETE_COPY(TradeTab)
diff --git a/src/gui/widgets/whispertab.h b/src/gui/widgets/whispertab.h
index 7cf5ece0d..5bc9fe2c2 100644
--- a/src/gui/widgets/whispertab.h
+++ b/src/gui/widgets/whispertab.h
@@ -73,4 +73,4 @@ class WhisperTab final : public ChatTab
std::string mNick;
};
-#endif // CHANNELTAB_H
+#endif // CHANNELTAB_H
diff --git a/src/gui/widgets/widget2.h b/src/gui/widgets/widget2.h
index d8d158cf2..053b1560f 100644
--- a/src/gui/widgets/widget2.h
+++ b/src/gui/widgets/widget2.h
@@ -33,7 +33,7 @@ class Widget2
{
}
- Widget2(const Widget2 *const widget) :
+ explicit Widget2(const Widget2 *const widget) :
mPaletteOffset(widget ? widget->mPaletteOffset : 0)
{
checkPalette();
diff --git a/src/gui/widgets/windowcontainer.h b/src/gui/widgets/windowcontainer.h
index 660d2ab8a..27fc065fe 100644
--- a/src/gui/widgets/windowcontainer.h
+++ b/src/gui/widgets/windowcontainer.h
@@ -36,7 +36,7 @@
class WindowContainer : public Container
{
public:
- WindowContainer(const Widget2 *const widget);
+ explicit WindowContainer(const Widget2 *const widget);
void slowLogic();