From b639270b2854e2d069bbff9b888dfeb159f9b400 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 8 Oct 2012 20:52:00 +0300 Subject: Fix code style. --- src/being.cpp | 2 +- src/being.h | 3 ++- src/configuration.cpp | 4 ++-- src/net/tmwa/npchandler.cpp | 5 ++++- src/normalopenglgraphics.h | 24 +++++++++++++----------- src/resources/monsterdb.cpp | 2 +- 6 files changed, 23 insertions(+), 17 deletions(-) (limited to 'src') diff --git a/src/being.cpp b/src/being.cpp index ad867ffbc..c55fba9dd 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -1363,7 +1363,7 @@ void Being::logic() case ATTACK: { - std::string particleEffect(""); +// std::string particleEffect(""); if (!mActionTime) break; diff --git a/src/being.h b/src/being.h index 58d3ea21c..d16670dbb 100644 --- a/src/being.h +++ b/src/being.h @@ -594,7 +594,8 @@ class Being : public ActorSprite, public ConfigListener int getEmotion() const { return mEmotion; } - virtual void drawSprites(Graphics* graphics, int posX, int posY) const override; + virtual void drawSprites(Graphics* graphics, + int posX, int posY) const override; virtual void drawSpritesSDL(Graphics* graphics, int posX, int posY) const override; diff --git a/src/configuration.cpp b/src/configuration.cpp index a9c4037e9..2ba53cca4 100644 --- a/src/configuration.cpp +++ b/src/configuration.cpp @@ -757,8 +757,8 @@ void ConfigurationObject::writeToXML(const XmlTextWriterPtr writer) } #endif XmlTextWriterStartElement(writer, "option"); - XmlTextWriterWriteAttribute(writer,"name", i->first.c_str()); - XmlTextWriterWriteAttribute(writer,"value", i->second.c_str()); + XmlTextWriterWriteAttribute(writer, "name", i->first.c_str()); + XmlTextWriterWriteAttribute(writer, "value", i->second.c_str()); xmlTextWriterEndElement(writer); } diff --git a/src/net/tmwa/npchandler.cpp b/src/net/tmwa/npchandler.cpp index 856b67828..3e9fe3822 100644 --- a/src/net/tmwa/npchandler.cpp +++ b/src/net/tmwa/npchandler.cpp @@ -294,7 +294,10 @@ void NpcHandler::processNpcCommand(Net::MessageIn &msg, int npcId) break; case 6: // show avatar if (mDialog) - mDialog->showAvatar(msg.readInt32()); // avatar id + { + mDialog->showAvatar(static_cast( + msg.readInt32())); // avatar id + } break; case 7: // set avatar direction if (mDialog) diff --git a/src/normalopenglgraphics.h b/src/normalopenglgraphics.h index 57815af38..9101fdaf4 100644 --- a/src/normalopenglgraphics.h +++ b/src/normalopenglgraphics.h @@ -100,9 +100,11 @@ class NormalOpenGLGraphics final : public Graphics void updateScreen() override; void _beginDraw(); + void _endDraw(); bool pushClipArea(gcn::Rectangle area); + void popClipArea(); void setColor(const gcn::Color &color); @@ -119,23 +121,23 @@ class NormalOpenGLGraphics final : public Graphics void setTargetPlane(int width, int height); - void drawQuadArrayfi(int size); + inline void drawQuadArrayfi(int size); - void drawQuadArrayfi(GLint *intVertArray, - GLfloat *floatTexArray, - const int size); + inline void drawQuadArrayfi(GLint *intVertArray, + GLfloat *floatTexArray, + const int size); - void drawQuadArrayii(int size); + inline void drawQuadArrayii(int size); - void drawQuadArrayii(GLint *intVertArray, - GLint *intTexArray, - const int size); + inline void drawQuadArrayii(GLint *intVertArray, + GLint *intTexArray, + const int size); - void drawLineArrayi(int size); + inline void drawLineArrayi(int size); - void drawLineArrayf(int size); + inline void drawLineArrayf(int size); - void drawVertexes(NormalOpenGLGraphicsVertexes &ogl); + inline void drawVertexes(NormalOpenGLGraphicsVertexes &ogl); void initArrays() override; diff --git a/src/resources/monsterdb.cpp b/src/resources/monsterdb.cpp index 22441c34e..ae0d6c3ba 100644 --- a/src/resources/monsterdb.cpp +++ b/src/resources/monsterdb.cpp @@ -51,7 +51,7 @@ void MonsterDB::load() logger->log1("Initializing monster database..."); XML::Document doc("monsters.xml"); - XmlNodePtr rootNode = doc.rootNode(); + const XmlNodePtr rootNode = doc.rootNode(); if (!rootNode || !xmlNameEqual(rootNode, "monsters")) { -- cgit v1.2.3-70-g09d2