summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-07-01 23:50:19 +0300
committerAndrei Karas <akaras@inbox.ru>2016-07-01 23:50:19 +0300
commit96d1d7c2600642930019bd5a9553f92ec2d7d5a9 (patch)
tree52b6428ed4639ad77f7941b23e975c57cb56e128 /src
parent731151351ec84abd70c011a75ab58f4adfd1cd6d (diff)
downloadManaVerse-96d1d7c2600642930019bd5a9553f92ec2d7d5a9.tar.gz
ManaVerse-96d1d7c2600642930019bd5a9553f92ec2d7d5a9.tar.bz2
ManaVerse-96d1d7c2600642930019bd5a9553f92ec2d7d5a9.tar.xz
ManaVerse-96d1d7c2600642930019bd5a9553f92ec2d7d5a9.zip
Fix code style.
Diffstat (limited to 'src')
-rw-r--r--src/net/ea/beingrecv.cpp6
-rw-r--r--src/net/tmwa/charserverrecv.cpp2
-rw-r--r--src/render/sdl2graphics.h1
-rw-r--r--src/render/sdl2softwaregraphics.h1
-rw-r--r--src/render/sdlgraphics.h1
-rw-r--r--src/render/softwaregraphicsdef.hpp2
6 files changed, 8 insertions, 5 deletions
diff --git a/src/net/ea/beingrecv.cpp b/src/net/ea/beingrecv.cpp
index 39a0e26e1..9b12583a8 100644
--- a/src/net/ea/beingrecv.cpp
+++ b/src/net/ea/beingrecv.cpp
@@ -45,8 +45,6 @@
#include "net/messagein.h"
#include "net/serverfeatures.h"
-#include "utils/checkutils.h"
-
#include "debug.h"
namespace Ea
@@ -436,8 +434,8 @@ void BeingRecv::processBeingMove3(Net::MessageIn &msg)
}
const int16_t speed = msg.readInt16("speed");
dstBeing->setWalkSpeed(speed);
- int16_t x = msg.readInt16("x");
- int16_t y = msg.readInt16("y");
+ const int16_t x = msg.readInt16("x");
+ const int16_t y = msg.readInt16("y");
dstBeing->setAction(BeingAction::STAND, 0);
dstBeing->setTileCoords(x, y);
diff --git a/src/net/tmwa/charserverrecv.cpp b/src/net/tmwa/charserverrecv.cpp
index e54b092e0..9728303ff 100644
--- a/src/net/tmwa/charserverrecv.cpp
+++ b/src/net/tmwa/charserverrecv.cpp
@@ -210,7 +210,7 @@ void CharServerRecv::processCharMapInfo(Net::MessageIn &restrict msg)
ServerInfo &server = mapServer;
BLOCK_START("CharServerRecv::processCharMapInfo")
PlayerInfo::setCharId(msg.readInt32("char id?"));
- GameHandler *const gh = static_cast<GameHandler*>(gameHandler);
+ const GameHandler *const gh = static_cast<GameHandler*>(gameHandler);
gh->setMap(msg.readString(16, "map name"));
if (config.getBoolValue("usePersistentIP") || settings.persistentIp)
{
diff --git a/src/render/sdl2graphics.h b/src/render/sdl2graphics.h
index 4b4d521ab..f0dc83329 100644
--- a/src/render/sdl2graphics.h
+++ b/src/render/sdl2graphics.h
@@ -104,6 +104,7 @@ class SDLGraphics final : public Graphics
RENDER_GRAPHICSDEF_HPP
#include "render/softwaregraphicsdef.hpp"
+ RENDER_SOFTWAREGRAPHICSDEF_HPP
protected:
uint32_t mRendererFlags;
diff --git a/src/render/sdl2softwaregraphics.h b/src/render/sdl2softwaregraphics.h
index 149c01d68..906ff106b 100644
--- a/src/render/sdl2softwaregraphics.h
+++ b/src/render/sdl2softwaregraphics.h
@@ -64,6 +64,7 @@ class SDL2SoftwareGraphics final : public Graphics
RENDER_GRAPHICSDEF_HPP
#include "render/softwaregraphicsdef.hpp"
+ RENDER_SOFTWAREGRAPHICSDEF_HPP
bool resizeScreen(const int width,
const int height) restrict2 override final;
diff --git a/src/render/sdlgraphics.h b/src/render/sdlgraphics.h
index 1a1d26aba..0f18c3c03 100644
--- a/src/render/sdlgraphics.h
+++ b/src/render/sdlgraphics.h
@@ -59,6 +59,7 @@ class SDLGraphics final : public Graphics
RENDER_GRAPHICSDEF_HPP
#include "render/softwaregraphicsdef.hpp"
+ RENDER_SOFTWAREGRAPHICSDEF_HPP
protected:
int SDL_FakeUpperBlit(const SDL_Surface *restrict const src,
diff --git a/src/render/softwaregraphicsdef.hpp b/src/render/softwaregraphicsdef.hpp
index 305b6ac40..c3eecf451 100644
--- a/src/render/softwaregraphicsdef.hpp
+++ b/src/render/softwaregraphicsdef.hpp
@@ -20,6 +20,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#define RENDER_SOFTWAREGRAPHICSDEF_HPP
+
public:
void calcTileSDL(ImageVertexes *restrict const vert,
int x, int y) const restrict2 override final;