diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-08-17 00:36:15 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-08-17 00:36:15 +0300 |
commit | 093e392dd84c920d26bca17d48ac6611393d087c (patch) | |
tree | 776845e14448e748f25dcfc92749ed1599b0ce31 | |
parent | b30df9b843eae2128431320308510f13296e3e7f (diff) | |
download | mv-093e392dd84c920d26bca17d48ac6611393d087c.tar.gz mv-093e392dd84c920d26bca17d48ac6611393d087c.tar.bz2 mv-093e392dd84c920d26bca17d48ac6611393d087c.tar.xz mv-093e392dd84c920d26bca17d48ac6611393d087c.zip |
Fix code style.
30 files changed, 45 insertions, 51 deletions
diff --git a/src/actionmanager.cpp b/src/actionmanager.cpp index 45d0fd0ac..5fd5dbc76 100644 --- a/src/actionmanager.cpp +++ b/src/actionmanager.cpp @@ -78,8 +78,6 @@ extern QuitDialog *quitDialog; namespace ActionManager { -void showHideWindow(Window *window); - impHandler0(moveUp) { if (NpcDialog *dialog = NpcDialog::getActive()) @@ -683,7 +681,7 @@ impHandler0(helpWindowShow) return false; } -void showHideWindow(Window *window) +static void showHideWindow(Window *window) { if (window) { @@ -1007,9 +1005,7 @@ impHandler0(targetAttack) return false; } -bool setTarget(ActorSprite::Type type); - -bool setTarget(ActorSprite::Type type) +static bool setTarget(ActorSprite::Type type) { if (actorSpriteManager && player_node) { diff --git a/src/actorsprite.cpp b/src/actorsprite.cpp index 584156392..5ec8ba793 100644 --- a/src/actorsprite.cpp +++ b/src/actorsprite.cpp @@ -20,8 +20,8 @@ */ #include "actorsprite.h" -#include "actorspritelistener.h" +#include "actorspritelistener.h" #include "client.h" #include "configuration.h" #include "effectmanager.h" diff --git a/src/client.cpp b/src/client.cpp index 983186ade..390d32b1a 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -20,9 +20,10 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "client.h" #include "main.h" +#include "client.h" + #include "auctionmanager.h" #include "chatlogger.h" #include "configuration.h" diff --git a/src/effectmanager.cpp b/src/effectmanager.cpp index f477da631..5c403c622 100644 --- a/src/effectmanager.cpp +++ b/src/effectmanager.cpp @@ -20,8 +20,9 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "being.h" #include "effectmanager.h" + +#include "being.h" #include "logger.h" #include "particle.h" #include "sound.h" diff --git a/src/flooritem.cpp b/src/flooritem.cpp index a6d45f788..69284c998 100644 --- a/src/flooritem.cpp +++ b/src/flooritem.cpp @@ -31,8 +31,6 @@ #include "gui/gui.h" #include "gui/sdlfont.h" -//#include "net/net.h" - #include "resources/itemdb.h" #include "resources/iteminfo.h" diff --git a/src/graphicsvertexes.cpp b/src/graphicsvertexes.cpp index d09bc2d91..189f28348 100644 --- a/src/graphicsvertexes.cpp +++ b/src/graphicsvertexes.cpp @@ -20,8 +20,6 @@ #include "graphicsvertexes.h" -#include "main.h" - #include "utils/dtor.h" #include "debug.h" diff --git a/src/graphicsvertexes.h b/src/graphicsvertexes.h index b44f69179..bf435194d 100644 --- a/src/graphicsvertexes.h +++ b/src/graphicsvertexes.h @@ -41,9 +41,6 @@ #include <list> #include <vector> -//include <guichan/sdl/sdlgraphics.hpp> - - struct DoubleRect { SDL_Rect src; diff --git a/src/gui/changepassworddialog.cpp b/src/gui/changepassworddialog.cpp index 657bf8fd9..00ac3ab69 100644 --- a/src/gui/changepassworddialog.cpp +++ b/src/gui/changepassworddialog.cpp @@ -20,7 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "changepassworddialog.h" +#include "gui/changepassworddialog.h" #include "client.h" #include "logger.h" diff --git a/src/gui/connectiondialog.cpp b/src/gui/connectiondialog.cpp index ba1330881..b5357d83c 100644 --- a/src/gui/connectiondialog.cpp +++ b/src/gui/connectiondialog.cpp @@ -20,7 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "connectiondialog.h" +#include "gui/connectiondialog.h" #include "logger.h" diff --git a/src/gui/equipmentwindow.cpp b/src/gui/equipmentwindow.cpp index 417dca680..2a61b9a0f 100644 --- a/src/gui/equipmentwindow.cpp +++ b/src/gui/equipmentwindow.cpp @@ -22,8 +22,6 @@ #include "gui/equipmentwindow.h" -#include "gui/widgets/button.h" - #include "being.h" #include "equipment.h" #include "graphics.h" @@ -36,6 +34,7 @@ #include "gui/setup.h" #include "gui/viewport.h" +#include "gui/widgets/button.h" #include "gui/widgets/playerbox.h" #include "net/inventoryhandler.h" diff --git a/src/gui/killstats.cpp b/src/gui/killstats.cpp index 37fd70340..9de807c6c 100644 --- a/src/gui/killstats.cpp +++ b/src/gui/killstats.cpp @@ -22,9 +22,6 @@ #include "gui/killstats.h" -#include <math.h> -#include <guichan/widgets/label.hpp> - #include "gui/widgets/button.h" #include "gui/widgets/label.h" #include "gui/widgets/layout.h" @@ -39,6 +36,9 @@ #include "utils/gettext.h" #include "utils/stringutils.h" +#include <math.h> +#include <guichan/widgets/label.hpp> + #include "debug.h" KillStats::KillStats(): diff --git a/src/gui/palette.cpp b/src/gui/palette.cpp index e24907256..a31346b87 100644 --- a/src/gui/palette.cpp +++ b/src/gui/palette.cpp @@ -21,7 +21,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "palette.h" +#include "gui/palette.h" #include "configuration.h" #include "client.h" diff --git a/src/gui/sdlinput.cpp b/src/gui/sdlinput.cpp index 283d1b33e..7d484e082 100644 --- a/src/gui/sdlinput.cpp +++ b/src/gui/sdlinput.cpp @@ -56,7 +56,7 @@ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "sdlinput.h" +#include "gui/sdlinput.h" #include "keyinput.h" diff --git a/src/gui/userpalette.cpp b/src/gui/userpalette.cpp index 60f99b66c..5d878a0f0 100644 --- a/src/gui/userpalette.cpp +++ b/src/gui/userpalette.cpp @@ -21,7 +21,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "userpalette.h" +#include "gui/userpalette.h" #include "configuration.h" #include "client.h" diff --git a/src/gui/widgets/flowcontainer.cpp b/src/gui/widgets/flowcontainer.cpp index acda5ad88..be7e3136d 100644 --- a/src/gui/widgets/flowcontainer.cpp +++ b/src/gui/widgets/flowcontainer.cpp @@ -19,7 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "flowcontainer.h" +#include "gui/widgets/flowcontainer.h" #include "debug.h" diff --git a/src/gui/widgets/itemlinkhandler.cpp b/src/gui/widgets/itemlinkhandler.cpp index 45cb25463..00f310c51 100644 --- a/src/gui/widgets/itemlinkhandler.cpp +++ b/src/gui/widgets/itemlinkhandler.cpp @@ -20,20 +20,20 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <sstream> -#include <string> +#include "gui/widgets/itemlinkhandler.h" #include "item.h" #include "gui/itempopup.h" #include "gui/viewport.h" -#include "gui/widgets/itemlinkhandler.h" - #include "utils/process.h" #include "resources/itemdb.h" +#include <sstream> +#include <string> + #include "debug.h" ItemLinkHandler::ItemLinkHandler() : diff --git a/src/gui/widgets/passwordfield.cpp b/src/gui/widgets/passwordfield.cpp index 6f339ddd7..a976f440e 100644 --- a/src/gui/widgets/passwordfield.cpp +++ b/src/gui/widgets/passwordfield.cpp @@ -20,7 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "passwordfield.h" +#include "gui/widgets/passwordfield.h" #include "debug.h" diff --git a/src/inventory.cpp b/src/inventory.cpp index 8569dc8fb..75729a28b 100644 --- a/src/inventory.cpp +++ b/src/inventory.cpp @@ -21,6 +21,7 @@ */ #include "inventory.h" + #include "item.h" #include "logger.h" diff --git a/src/logger.cpp b/src/logger.cpp index 91f746ef3..df938c5f3 100644 --- a/src/logger.cpp +++ b/src/logger.cpp @@ -20,11 +20,11 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include "logger.h" + #include <iostream> #include <sstream> -#include "logger.h" - #include "configuration.h" #include "gui/widgets/chattab.h" diff --git a/src/main.cpp b/src/main.cpp index f30e7bc62..4ed190417 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -22,8 +22,6 @@ #include "main.h" -#include "utils/gettext.h" - #include "client.h" #include "logger.h" @@ -31,6 +29,7 @@ #include <iostream> #include <physfs.h> +#include "utils/gettext.h" #include "utils/paths.h" #include "utils/stringutils.h" #include "utils/xml.h" diff --git a/src/normalopenglgraphics.cpp b/src/normalopenglgraphics.cpp index 75eafc732..89223838d 100644 --- a/src/normalopenglgraphics.cpp +++ b/src/normalopenglgraphics.cpp @@ -24,10 +24,11 @@ #ifdef USE_OPENGL -#include "graphicsmanager.h" -#include "graphicsvertexes.h" #include "normalopenglgraphics.h" + #include "configuration.h" +#include "graphicsmanager.h" +#include "graphicsvertexes.h" #include "logger.h" #include "resources/image.h" diff --git a/src/particle.cpp b/src/particle.cpp index 30bd8e467..337fc7dc9 100644 --- a/src/particle.cpp +++ b/src/particle.cpp @@ -20,8 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <algorithm> -#include <cmath> +#include "particle.h" #include "animationparticle.h" #include "configuration.h" @@ -29,7 +28,6 @@ #include "imageparticle.h" #include "logger.h" #include "map.h" -#include "particle.h" #include "particleemitter.h" #include "rotationalparticle.h" #include "textparticle.h" diff --git a/src/particleemitter.cpp b/src/particleemitter.cpp index 918f25570..fc4f865f6 100644 --- a/src/particleemitter.cpp +++ b/src/particleemitter.cpp @@ -20,11 +20,12 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include "particleemitter.h" + #include "animationparticle.h" #include "imageparticle.h" #include "logger.h" #include "particle.h" -#include "particleemitter.h" #include "rotationalparticle.h" #include "resources/dye.h" diff --git a/src/playerrelations.cpp b/src/playerrelations.cpp index 59e7de05e..29d9331ad 100644 --- a/src/playerrelations.cpp +++ b/src/playerrelations.cpp @@ -22,8 +22,6 @@ #include "playerrelations.h" -#include <algorithm> - #include "actorspritemanager.h" #include "being.h" #include "configuration.h" @@ -33,6 +31,8 @@ #include "utils/dtor.h" #include "utils/gettext.h" +#include <algorithm> + #include "debug.h" #define PLAYER_IGNORE_STRATEGY_NOP "nop" diff --git a/src/rotationalparticle.cpp b/src/rotationalparticle.cpp index f92b0f3eb..7c79932a3 100644 --- a/src/rotationalparticle.cpp +++ b/src/rotationalparticle.cpp @@ -21,6 +21,7 @@ */ #include "rotationalparticle.h" + #include "graphics.h" #include "simpleanimation.h" diff --git a/src/sound.cpp b/src/sound.cpp index 3e322a585..133494ec3 100644 --- a/src/sound.cpp +++ b/src/sound.cpp @@ -22,8 +22,6 @@ #include "sound.h" -#include <SDL.h> - #include "configuration.h" #include "localplayer.h" #include "logger.h" @@ -32,6 +30,8 @@ #include "resources/resourcemanager.h" #include "resources/soundeffect.h" +#include <SDL.h> + #include "debug.h" /** diff --git a/src/spellshortcut.cpp b/src/spellshortcut.cpp index ad506e6d5..025723062 100644 --- a/src/spellshortcut.cpp +++ b/src/spellshortcut.cpp @@ -20,10 +20,11 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include "spellshortcut.h" + #include "configuration.h" #include "inventory.h" #include "item.h" -#include "spellshortcut.h" #include "localplayer.h" #include "gui/widgets/chattab.h" diff --git a/src/utils/copynpaste.cpp b/src/utils/copynpaste.cpp index 461de1001..88e2db580 100644 --- a/src/utils/copynpaste.cpp +++ b/src/utils/copynpaste.cpp @@ -408,7 +408,8 @@ bool retrieveBuffer(std::string& text, size_t& pos) return false; } -static bool runxsel(std::string& text, const char *p1, const char *p2 = nullptr); +static bool runxsel(std::string& text, const char *p1, + const char *p2 = nullptr); bool sendBuffer(std::string& text) { diff --git a/src/utils/mkdir.cpp b/src/utils/mkdir.cpp index f73af6db5..05e7d4bd3 100644 --- a/src/utils/mkdir.cpp +++ b/src/utils/mkdir.cpp @@ -19,6 +19,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include "utils/mkdir.h" + #include <climits> #include <cstring> #include <cerrno> @@ -35,8 +37,6 @@ #include <cstdlib> #endif -#include "utils/mkdir.h" - #include "debug.h" #if defined WIN32 diff --git a/src/utils/physfsrwops.cpp b/src/utils/physfsrwops.cpp index 19b08d4c7..1afedf2a3 100644 --- a/src/utils/physfsrwops.cpp +++ b/src/utils/physfsrwops.cpp @@ -22,9 +22,10 @@ * Copyright (C) 2012 The ManaPlus Developers */ -#include <stdio.h> /* used for SEEK_SET, SEEK_CUR, SEEK_END ... */ #include "utils/physfsrwops.h" +#include <stdio.h> /* used for SEEK_SET, SEEK_CUR, SEEK_END ... */ + #include "localconsts.h" #include "debug.h" |