From c53136fce2b1cca1bb9273255ad86f0aded747c2 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 29 Feb 2012 20:56:37 +0300 Subject: Fix code style in empty methods. --- src/actorspritelistener.h | 3 ++- src/commandhandler.h | 3 ++- src/configlistener.h | 3 ++- src/equipment.h | 5 ++++- src/gui/chatwindow.cpp | 3 ++- src/gui/editserverdialog.h | 3 ++- src/gui/sdlinput.h | 3 ++- src/gui/setup_relations.cpp | 6 ++++-- src/gui/textcommandeditor.cpp | 6 ++++-- src/gui/widgets/browserbox.h | 3 ++- src/gui/widgets/flowcontainer.h | 3 ++- src/gui/widgets/linkhandler.h | 3 ++- src/gui/widgets/tablemodel.h | 3 ++- src/gui/worldselectdialog.cpp | 3 ++- src/guichan/include/guichan/actionlistener.hpp | 7 ++++--- src/guichan/include/guichan/deathlistener.hpp | 7 ++++--- src/guichan/include/guichan/focushandler.hpp | 3 ++- src/guichan/include/guichan/focuslistener.hpp | 12 ++++++++---- src/guichan/include/guichan/graphics.hpp | 9 ++++++--- src/guichan/include/guichan/keylistener.hpp | 12 ++++++++---- src/guichan/include/guichan/listmodel.hpp | 3 ++- src/guichan/include/guichan/mouselistener.hpp | 6 ++++-- src/guichan/include/guichan/widget.hpp | 18 ++++++++++++------ src/guichan/include/guichan/widgetlistener.hpp | 19 ++++++++++++------- src/guichan/include/guichan/widgets/listbox.hpp | 3 ++- src/guichan/include/guichan/widgets/slider.hpp | 3 ++- src/logger.h | 6 ++++-- src/net/manaserv/gamehandler.h | 3 ++- src/particlecontainer.h | 3 ++- src/sprite.h | 3 ++- 30 files changed, 110 insertions(+), 57 deletions(-) diff --git a/src/actorspritelistener.h b/src/actorspritelistener.h index 314825fc7..7fdb99dc4 100644 --- a/src/actorspritelistener.h +++ b/src/actorspritelistener.h @@ -30,7 +30,8 @@ class ActorSpriteListener /** * Destructor. */ - virtual ~ActorSpriteListener() {} + virtual ~ActorSpriteListener() + { } /** * Called when the ActorSprite has been destroyed. The listener will diff --git a/src/commandhandler.h b/src/commandhandler.h index cd25c234a..d399accf7 100644 --- a/src/commandhandler.h +++ b/src/commandhandler.h @@ -48,7 +48,8 @@ class CommandHandler /** * Destructor */ - ~CommandHandler() {} + ~CommandHandler() + { } /** * Parse and handle the given command. diff --git a/src/configlistener.h b/src/configlistener.h index e4bbbee53..28540c564 100644 --- a/src/configlistener.h +++ b/src/configlistener.h @@ -37,7 +37,8 @@ class ConfigListener /** * Destructor. */ - virtual ~ConfigListener() {} + virtual ~ConfigListener() + { } /** * Called when an option changed. The config listener will have to be diff --git a/src/equipment.h b/src/equipment.h index 50acd60d3..ed38d32ca 100644 --- a/src/equipment.h +++ b/src/equipment.h @@ -66,8 +66,11 @@ class Equipment { public: virtual Item *getEquipment(int index) const = 0; + virtual void clear() = 0; - virtual ~Backend() { } + + virtual ~Backend() + { } }; /** diff --git a/src/gui/chatwindow.cpp b/src/gui/chatwindow.cpp index 69e4d703f..ac493b04e 100644 --- a/src/gui/chatwindow.cpp +++ b/src/gui/chatwindow.cpp @@ -133,7 +133,8 @@ const char *COLOR_NAME[14] = class ColorListModel : public gcn::ListModel { public: - virtual ~ColorListModel() { } + virtual ~ColorListModel() + { } virtual int getNumberOfElements() { diff --git a/src/gui/editserverdialog.h b/src/gui/editserverdialog.h index 6035b0e50..4ad6b8fcb 100644 --- a/src/gui/editserverdialog.h +++ b/src/gui/editserverdialog.h @@ -44,7 +44,8 @@ class TypeListModel; class TypeListModel : public gcn::ListModel { public: - TypeListModel() {} + TypeListModel() + { } /** * Used to get number of line in the list diff --git a/src/gui/sdlinput.h b/src/gui/sdlinput.h index 17cb4ea8a..f68612793 100644 --- a/src/gui/sdlinput.h +++ b/src/gui/sdlinput.h @@ -147,7 +147,8 @@ public: * only use SDL and plan sticking with SDL you can safely ignore this * function as it in the SDL case does nothing. */ - virtual void _pollInput() { } + virtual void _pollInput() + { } // Inherited from Input diff --git a/src/gui/setup_relations.cpp b/src/gui/setup_relations.cpp index f3b664c9b..d9f7a362d 100644 --- a/src/gui/setup_relations.cpp +++ b/src/gui/setup_relations.cpp @@ -80,7 +80,8 @@ static const char *RELATION_NAMES[PlayerRelation::RELATIONS_NR] = class PlayerRelationListModel : public gcn::ListModel { public: - virtual ~PlayerRelationListModel() { } + virtual ~PlayerRelationListModel() + { } virtual int getNumberOfElements() { @@ -211,7 +212,8 @@ protected: class IgnoreChoicesListModel : public gcn::ListModel { public: - virtual ~IgnoreChoicesListModel() { } + virtual ~IgnoreChoicesListModel() + { } virtual int getNumberOfElements() { diff --git a/src/gui/textcommandeditor.cpp b/src/gui/textcommandeditor.cpp index 7b9442318..3f98b4ea3 100644 --- a/src/gui/textcommandeditor.cpp +++ b/src/gui/textcommandeditor.cpp @@ -127,7 +127,8 @@ const char *MAGIC_SCHOOL_TEXT[6] = class TargetTypeModel : public gcn::ListModel { public: - virtual ~TargetTypeModel() { } + virtual ~TargetTypeModel() + { } virtual int getNumberOfElements() { @@ -146,7 +147,8 @@ public: class MagicSchoolModel : public gcn::ListModel { public: - virtual ~MagicSchoolModel() { } + virtual ~MagicSchoolModel() + { } virtual int getNumberOfElements() { diff --git a/src/gui/widgets/browserbox.h b/src/gui/widgets/browserbox.h index d82ebd758..b1582e077 100644 --- a/src/gui/widgets/browserbox.h +++ b/src/gui/widgets/browserbox.h @@ -104,7 +104,8 @@ class BrowserBox : public gcn::Widget, /** * Sets the maximum numbers of rows in the browser box. 0 = no limit. */ - void setMaxRow(unsigned max) {mMaxRows = max; }; + void setMaxRow(unsigned max) + { mMaxRows = max; }; /** * Disable links & user defined colors to be used in chat input. diff --git a/src/gui/widgets/flowcontainer.h b/src/gui/widgets/flowcontainer.h index 677dd3661..e5eeebdcb 100644 --- a/src/gui/widgets/flowcontainer.h +++ b/src/gui/widgets/flowcontainer.h @@ -43,7 +43,8 @@ class FlowContainer : public Container, /** * Destructor. */ - ~FlowContainer() {} + ~FlowContainer() + { } /** * Invoked when a widget changes its size. This is used to determine diff --git a/src/gui/widgets/linkhandler.h b/src/gui/widgets/linkhandler.h index 366899ffc..703f593f2 100644 --- a/src/gui/widgets/linkhandler.h +++ b/src/gui/widgets/linkhandler.h @@ -34,7 +34,8 @@ class LinkHandler { public: - virtual ~LinkHandler() { } + virtual ~LinkHandler() + { } virtual void handleLink(const std::string &link, gcn::MouseEvent *event) = 0; diff --git a/src/gui/widgets/tablemodel.h b/src/gui/widgets/tablemodel.h index 40a350163..e931888e4 100644 --- a/src/gui/widgets/tablemodel.h +++ b/src/gui/widgets/tablemodel.h @@ -42,7 +42,8 @@ public: */ virtual void modelUpdated(bool completed) = 0; - virtual ~TableModelListener() {} + virtual ~TableModelListener() + { } }; /** diff --git a/src/gui/worldselectdialog.cpp b/src/gui/worldselectdialog.cpp index 917605281..19e6b81f7 100644 --- a/src/gui/worldselectdialog.cpp +++ b/src/gui/worldselectdialog.cpp @@ -54,7 +54,8 @@ class WorldListModel : public gcn::ListModel { } - virtual ~WorldListModel() {} + virtual ~WorldListModel() + { } int getNumberOfElements() { diff --git a/src/guichan/include/guichan/actionlistener.hpp b/src/guichan/include/guichan/actionlistener.hpp index 28373f2df..5991486a7 100644 --- a/src/guichan/include/guichan/actionlistener.hpp +++ b/src/guichan/include/guichan/actionlistener.hpp @@ -67,7 +67,8 @@ namespace gcn /** * Destructor. */ - virtual ~ActionListener() { } + virtual ~ActionListener() + { } /** * Called when an action is recieved from a widget. It is used @@ -86,8 +87,8 @@ namespace gcn * You should not be able to make an instance of ActionListener, * therefore its constructor is protected. */ - ActionListener() { } - + ActionListener() + { } }; } diff --git a/src/guichan/include/guichan/deathlistener.hpp b/src/guichan/include/guichan/deathlistener.hpp index 5e983e02d..b2061e036 100644 --- a/src/guichan/include/guichan/deathlistener.hpp +++ b/src/guichan/include/guichan/deathlistener.hpp @@ -66,7 +66,8 @@ namespace gcn /** * Destructor. */ - virtual ~DeathListener() { } + virtual ~DeathListener() + { } /** * Called when a widget dies. It is used to be able to recieve @@ -83,8 +84,8 @@ namespace gcn * You should not be able to make an instance of DeathListener, * therefore its constructor is protected. */ - DeathListener() { } - + DeathListener() + { } }; } diff --git a/src/guichan/include/guichan/focushandler.hpp b/src/guichan/include/guichan/focushandler.hpp index 4caba6f7b..9fa7ddeb7 100644 --- a/src/guichan/include/guichan/focushandler.hpp +++ b/src/guichan/include/guichan/focushandler.hpp @@ -80,7 +80,8 @@ namespace gcn /** * Destructor. */ - virtual ~FocusHandler() { }; + virtual ~FocusHandler() + { }; /** * Requests focus for a widget. Focus will only be granted to a widget diff --git a/src/guichan/include/guichan/focuslistener.hpp b/src/guichan/include/guichan/focuslistener.hpp index 9ec53b860..3876e8518 100644 --- a/src/guichan/include/guichan/focuslistener.hpp +++ b/src/guichan/include/guichan/focuslistener.hpp @@ -72,21 +72,24 @@ namespace gcn /** * Destructor. */ - virtual ~FocusListener() { } + virtual ~FocusListener() + { } /** * Called when a widget gains focus. * * @param event Discribes the event. */ - virtual void focusGained(const Event& event A_UNUSED) { }; + virtual void focusGained(const Event& event A_UNUSED) + { }; /** * Called when a widget loses focus. * * @param event Discribes the event. */ - virtual void focusLost(const Event& event A_UNUSED) { }; + virtual void focusLost(const Event& event A_UNUSED) + { }; protected: /** @@ -95,7 +98,8 @@ namespace gcn * You should not be able to make an instance of FocusListener, * therefore its constructor is protected. */ - FocusListener() { } + FocusListener() + { } }; } diff --git a/src/guichan/include/guichan/graphics.hpp b/src/guichan/include/guichan/graphics.hpp index efefa3d73..d10c63ae1 100644 --- a/src/guichan/include/guichan/graphics.hpp +++ b/src/guichan/include/guichan/graphics.hpp @@ -113,7 +113,8 @@ namespace gcn /** * Destructor. */ - virtual ~Graphics() { } + virtual ~Graphics() + { } /** * Initializes drawing. Called by the Gui when Gui::draw() is called. @@ -126,7 +127,8 @@ namespace gcn * * @see _endDraw, Gui::draw */ - virtual void _beginDraw() { } + virtual void _beginDraw() + { } /** * Deinitializes drawing. Called by the Gui when a Gui::draw() is done. @@ -137,7 +139,8 @@ namespace gcn * * @see _beginDraw, Gui::draw */ - virtual void _endDraw() { } + virtual void _endDraw() + { } /** * Pushes a clip area onto the stack. The x and y coordinates in the diff --git a/src/guichan/include/guichan/keylistener.hpp b/src/guichan/include/guichan/keylistener.hpp index a6d6f851d..9f90a1ffc 100644 --- a/src/guichan/include/guichan/keylistener.hpp +++ b/src/guichan/include/guichan/keylistener.hpp @@ -70,7 +70,8 @@ namespace gcn /** * Destructor. */ - virtual ~KeyListener() { } + virtual ~KeyListener() + { } /** * Called if a key is pressed when the widget has keyboard focus. @@ -79,14 +80,16 @@ namespace gcn * * @param keyEvent Discribes the event. */ - virtual void keyPressed(KeyEvent& keyEvent A_UNUSED) { } + virtual void keyPressed(KeyEvent& keyEvent A_UNUSED) + { } /** * Called if a key is released when the widget has keyboard focus. * * @param keyEvent Discribes the event. */ - virtual void keyReleased(KeyEvent& keyEvent A_UNUSED) { } + virtual void keyReleased(KeyEvent& keyEvent A_UNUSED) + { } protected: /** @@ -95,7 +98,8 @@ namespace gcn * You should not be able to make an instance of KeyListener, * therefore its constructor is protected. */ - KeyListener() { } + KeyListener() + { } }; } diff --git a/src/guichan/include/guichan/listmodel.hpp b/src/guichan/include/guichan/listmodel.hpp index 612a5d4bd..bf139afb1 100644 --- a/src/guichan/include/guichan/listmodel.hpp +++ b/src/guichan/include/guichan/listmodel.hpp @@ -65,7 +65,8 @@ namespace gcn /** * Destructor. */ - virtual ~ListModel() { } + virtual ~ListModel() + { } /** * Gets the number of elements in the list. diff --git a/src/guichan/include/guichan/mouselistener.hpp b/src/guichan/include/guichan/mouselistener.hpp index 2f12ecdac..b78f529e9 100644 --- a/src/guichan/include/guichan/mouselistener.hpp +++ b/src/guichan/include/guichan/mouselistener.hpp @@ -69,7 +69,8 @@ namespace gcn /** * Destructor. */ - virtual ~MouseListener() { } + virtual ~MouseListener() + { } /** * Called when the mouse has entered into the widget area. @@ -183,7 +184,8 @@ namespace gcn * You should not be able to make an instance of MouseListener, * therefore its constructor is protected. */ - MouseListener() { } + MouseListener() + { } }; } diff --git a/src/guichan/include/guichan/widget.hpp b/src/guichan/include/guichan/widget.hpp index 69126e3df..b6146b791 100644 --- a/src/guichan/include/guichan/widget.hpp +++ b/src/guichan/include/guichan/widget.hpp @@ -173,7 +173,8 @@ namespace gcn * @see Gui::logic * @since 0.1.0 */ - virtual void logic() { } + virtual void logic() + { } /** * Gets the widget's parent container. @@ -686,7 +687,8 @@ namespace gcn * * @since 0.1.0 */ - virtual void fontChanged() { } + virtual void fontChanged() + { } /** * Checks if a widget exists or not, that is if it still exists @@ -895,7 +897,8 @@ namespace gcn * @see moveToBottom * @since 0.1.0 */ - virtual void moveToTop(Widget* widget A_UNUSED) { }; + virtual void moveToTop(Widget* widget A_UNUSED) + { }; /** * Moves a widget in this widget to the bottom of this widget. @@ -905,7 +908,8 @@ namespace gcn * @see moveToTop * @since 0.1.0 */ - virtual void moveToBottom(Widget* widget A_UNUSED) { }; + virtual void moveToBottom(Widget* widget A_UNUSED) + { }; /** * Focuses the next widget in the widget. @@ -913,7 +917,8 @@ namespace gcn * @see moveToBottom * @since 0.1.0 */ - virtual void focusNext() { }; + virtual void focusNext() + { }; /** * Focuses the previous widget in the widget. @@ -921,7 +926,8 @@ namespace gcn * @see moveToBottom * @since 0.1.0 */ - virtual void focusPrevious() { }; + virtual void focusPrevious() + { }; /** * Tries to show a specific part of a widget by moving it. Used if the diff --git a/src/guichan/include/guichan/widgetlistener.hpp b/src/guichan/include/guichan/widgetlistener.hpp index 0ede5b871..f0cb60fd3 100644 --- a/src/guichan/include/guichan/widgetlistener.hpp +++ b/src/guichan/include/guichan/widgetlistener.hpp @@ -74,7 +74,8 @@ namespace gcn /** * Destructor. */ - virtual ~WidgetListener() { } + virtual ~WidgetListener() + { } /** * Invoked when a widget changes its size. @@ -82,7 +83,8 @@ namespace gcn * @param event Describes the event. * @since 0.8.0 */ - virtual void widgetResized(const Event& event A_UNUSED) { } + virtual void widgetResized(const Event& event A_UNUSED) + { } /** * Invoked when a widget is moved. @@ -90,7 +92,8 @@ namespace gcn * @param event Describes the event. * @since 0.8.0 */ - virtual void widgetMoved(const Event& event A_UNUSED) { } + virtual void widgetMoved(const Event& event A_UNUSED) + { } /** * Invoked when a widget is hidden, i.e it's set to be @@ -99,7 +102,8 @@ namespace gcn * @param event Describes the event. * @since 0.8.0 */ - virtual void widgetHidden(const Event& event A_UNUSED) { } + virtual void widgetHidden(const Event& event A_UNUSED) + { } /** * Invoked when a widget is shown, i.e it's set to be @@ -108,7 +112,8 @@ namespace gcn * @param event Describes the event. * @since 0.8.0 */ - virtual void widgetShown(const Event& event A_UNUSED) { } + virtual void widgetShown(const Event& event A_UNUSED) + { } protected: /** @@ -117,8 +122,8 @@ namespace gcn * You should not be able to make an instance of WidgetListener, * therefore its constructor is protected. */ - WidgetListener() { } - + WidgetListener() + { } }; } diff --git a/src/guichan/include/guichan/widgets/listbox.hpp b/src/guichan/include/guichan/widgets/listbox.hpp index 1e73c2214..ce056acbd 100644 --- a/src/guichan/include/guichan/widgets/listbox.hpp +++ b/src/guichan/include/guichan/widgets/listbox.hpp @@ -89,7 +89,8 @@ namespace gcn /** * Destructor. */ - virtual ~ListBox() { } + virtual ~ListBox() + { } /** * Gets the selected item as an index in the list model. diff --git a/src/guichan/include/guichan/widgets/slider.hpp b/src/guichan/include/guichan/widgets/slider.hpp index 77b0b8806..a22c36844 100644 --- a/src/guichan/include/guichan/widgets/slider.hpp +++ b/src/guichan/include/guichan/widgets/slider.hpp @@ -94,7 +94,8 @@ namespace gcn /** * Destructor. */ - virtual ~Slider() { } + virtual ~Slider() + { } /** * Sets the scale of the slider. diff --git a/src/logger.h b/src/logger.h index 3dc24420d..54b44cc0e 100644 --- a/src/logger.h +++ b/src/logger.h @@ -58,12 +58,14 @@ class Logger /** * Sets whether the log should be written to standard output. */ - void setLogToStandardOut(bool value) { mLogToStandardOut = value; } + void setLogToStandardOut(bool value) + { mLogToStandardOut = value; } /** * Enables logging to chat window */ - void setChatWindow(ChatWindow *window) { mChatWindow = window; } + void setChatWindow(ChatWindow *window) + { mChatWindow = window; } /** * Enters a message in the log. The message will be timestamped. diff --git a/src/net/manaserv/gamehandler.h b/src/net/manaserv/gamehandler.h index 83e636e0e..2019755ea 100644 --- a/src/net/manaserv/gamehandler.h +++ b/src/net/manaserv/gamehandler.h @@ -48,7 +48,8 @@ class GameHandler : public MessageHandler, public Net::GameHandler void quit(bool reconnectAccount); - void quit() { quit(false); } + void quit() + { quit(false); } void ping(int tick); diff --git a/src/particlecontainer.h b/src/particlecontainer.h index a8af163fd..4e402044b 100644 --- a/src/particlecontainer.h +++ b/src/particlecontainer.h @@ -57,7 +57,8 @@ public: /** * Kills and removes all particle effects (only in this container) */ - virtual void clearLocally() {} + virtual void clearLocally() + { } /** * Sets the positions of all elements diff --git a/src/sprite.h b/src/sprite.h index ffee97d49..ab2dcfc6a 100644 --- a/src/sprite.h +++ b/src/sprite.h @@ -32,7 +32,8 @@ class Image; class Sprite { public: - virtual ~Sprite() {} + virtual ~Sprite() + { } /** * Resets the sprite. -- cgit v1.2.3-70-g09d2