summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-11-23 22:39:54 +0300
committerAndrei Karas <akaras@inbox.ru>2012-11-24 15:05:41 +0300
commite8fc638b750514ec264598df79a409da97493816 (patch)
treef6530b6f1f1b56ab8a8131a472748db5d640fac3 /src
parentd553924a7f8c911d944207f7431b7e0ebd2b0fe8 (diff)
downloadplus-e8fc638b750514ec264598df79a409da97493816.tar.gz
plus-e8fc638b750514ec264598df79a409da97493816.tar.bz2
plus-e8fc638b750514ec264598df79a409da97493816.tar.xz
plus-e8fc638b750514ec264598df79a409da97493816.zip
Fix code style.
Diffstat (limited to 'src')
-rw-r--r--src/commandhandler.cpp2
-rw-r--r--src/commandhandler.h3
-rw-r--r--src/dropshortcut.cpp2
-rw-r--r--src/dropshortcut.h2
-rw-r--r--src/gui/debugwindow.cpp2
-rw-r--r--src/gui/widgets/browserbox.cpp2
-rw-r--r--src/mobileopenglgraphics.cpp7
-rw-r--r--src/normalopenglgraphics.cpp11
-rw-r--r--src/touchmanager.cpp2
9 files changed, 23 insertions, 10 deletions
diff --git a/src/commandhandler.cpp b/src/commandhandler.cpp
index 83078f49b..8fcfa6845 100644
--- a/src/commandhandler.cpp
+++ b/src/commandhandler.cpp
@@ -711,7 +711,7 @@ void CommandHandler::handleTarget(const std::string &args,
player_node->setTarget(target);
}
-void CommandHandler::handleAttackHuman(const std::string &args,
+void CommandHandler::handleAttackHuman(const std::string &args A_UNUSED,
ChatTab *const tab A_UNUSED)
{
if (!actorSpriteManager || !player_node)
diff --git a/src/commandhandler.h b/src/commandhandler.h
index 228682783..507218f01 100644
--- a/src/commandhandler.h
+++ b/src/commandhandler.h
@@ -222,7 +222,8 @@ class CommandHandler final
/**
* Handle atkhuman command.
*/
- static void handleAttackHuman(const std::string &args, ChatTab *const tab);
+ static void handleAttackHuman(const std::string &args,
+ ChatTab *const tab);
/**
* Handle closeall command.
diff --git a/src/dropshortcut.cpp b/src/dropshortcut.cpp
index 1211c228d..2cdaed3ac 100644
--- a/src/dropshortcut.cpp
+++ b/src/dropshortcut.cpp
@@ -224,7 +224,7 @@ void DropShortcut::setItem(const int index)
save();
}
-void DropShortcut::clear(bool isSave)
+void DropShortcut::clear(const bool isSave)
{
for (int i = 0; i < DROP_SHORTCUT_ITEMS; i++)
{
diff --git a/src/dropshortcut.h b/src/dropshortcut.h
index 3026ee9f5..c6bd982f0 100644
--- a/src/dropshortcut.h
+++ b/src/dropshortcut.h
@@ -146,7 +146,7 @@ class DropShortcut final
*/
void dropItems(const int cnt = 1);
- void clear(bool isSave = true);
+ void clear(const bool isSave = true);
private:
diff --git a/src/gui/debugwindow.cpp b/src/gui/debugwindow.cpp
index 6e11f83c5..04889d725 100644
--- a/src/gui/debugwindow.cpp
+++ b/src/gui/debugwindow.cpp
@@ -196,7 +196,9 @@ MapDebugTab::MapDebugTab(const Widget2 *const widget) :
place(0, 7, mParticleCountLabel, 2);
place(0, 8, mMapActorCountLabel, 2);
#ifdef USE_OPENGL
+#if defined (DEBUG_OPENGL_LEAKS) || defined(DEBUG_DRAW_CALLS)
int n = 9;
+#endif
#ifdef DEBUG_OPENGL_LEAKS
mTexturesLabel = new Label(this, strprintf("%s %s",
_("Textures count:"), "?"));
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp
index 51420e8c7..55bbcc89c 100644
--- a/src/gui/widgets/browserbox.cpp
+++ b/src/gui/widgets/browserbox.cpp
@@ -661,7 +661,7 @@ int BrowserBox::calcHeight()
}
y += fontHeight;
}
- if ((signed)wWidth != maxWidth)
+ if (static_cast<signed>(wWidth) != maxWidth)
{
wWidth = maxWidth;
setWidth(maxWidth);
diff --git a/src/mobileopenglgraphics.cpp b/src/mobileopenglgraphics.cpp
index 0a4029621..52e013f41 100644
--- a/src/mobileopenglgraphics.cpp
+++ b/src/mobileopenglgraphics.cpp
@@ -535,7 +535,8 @@ inline void MobileOpenGLGraphics::drawVertexes(const
{
const std::vector<GLfloat*> &floatTexPool = ogl.mFloatTexPool;
std::vector<GLfloat*>::const_iterator ft;
- const std::vector<GLfloat*>::const_iterator ft_end = floatTexPool.end();
+ const std::vector<GLfloat*>::const_iterator
+ ft_end = floatTexPool.end();
for (iv = shortVertPool.begin(), ft = floatTexPool.begin(),
ivp = vp.begin();
@@ -922,7 +923,11 @@ void MobileOpenGLGraphics::setColor(const gcn::Color& color)
mColorAlpha = (color.a != 255);
}
+#ifdef ANDROID
+void MobileOpenGLGraphics::drawPoint(int x A_UNUSED, int y A_UNUSED)
+#else
void MobileOpenGLGraphics::drawPoint(int x, int y)
+#endif
{
setTexturingAndBlending(false);
restoreColor();
diff --git a/src/normalopenglgraphics.cpp b/src/normalopenglgraphics.cpp
index eff2a62b9..11cc8ab5f 100644
--- a/src/normalopenglgraphics.cpp
+++ b/src/normalopenglgraphics.cpp
@@ -263,8 +263,9 @@ bool NormalOpenGLGraphics::drawImage2(const Image *const image,
return true;
}
-bool NormalOpenGLGraphics::drawRescaledImage(const Image *const image, int srcX,
- int srcY, int dstX, int dstY,
+bool NormalOpenGLGraphics::drawRescaledImage(const Image *const image,
+ int srcX, int srcY,
+ int dstX, int dstY,
const int width, const int height,
const int desiredWidth,
const int desiredHeight,
@@ -619,7 +620,8 @@ void NormalOpenGLGraphics::drawRescaledImagePattern(const Image *const image,
}
}
-void NormalOpenGLGraphics::drawImagePattern2(const GraphicsVertexes *const vert,
+void NormalOpenGLGraphics::drawImagePattern2(const GraphicsVertexes
+ *const vert,
const Image *const image)
{
if (!image)
@@ -651,7 +653,8 @@ inline void NormalOpenGLGraphics::drawVertexes(const
{
const std::vector<GLfloat*> &floatTexPool = ogl.mFloatTexPool;
std::vector<GLfloat*>::const_iterator ft;
- const std::vector<GLfloat*>::const_iterator ft_end = floatTexPool.end();
+ const std::vector<GLfloat*>::const_iterator
+ ft_end = floatTexPool.end();
for (iv = intVertPool.begin(), ft = floatTexPool.begin(),
ivp = vp.begin();
diff --git a/src/touchmanager.cpp b/src/touchmanager.cpp
index 4a992244c..7675cfb9b 100644
--- a/src/touchmanager.cpp
+++ b/src/touchmanager.cpp
@@ -34,6 +34,8 @@ TouchManager::TouchManager() :
mKeyboard(nullptr),
mPad(nullptr)
{
+ for (int f = 0;f < actionsSize; f ++)
+ mActions[f] = false;
}
TouchManager::~TouchManager()