summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-12-31 20:25:43 +0300
committerAndrei Karas <akaras@inbox.ru>2013-12-31 20:25:43 +0300
commit7e5386bc62f1f61d3409219292e1ec0d71cbd28e (patch)
tree3e4233abac1d52ff1103bdd8b4747a4e91b5f575 /src
parent62879acf891f1939e16fa32d2426b56f08f1609b (diff)
downloadplus-7e5386bc62f1f61d3409219292e1ec0d71cbd28e.tar.gz
plus-7e5386bc62f1f61d3409219292e1ec0d71cbd28e.tar.bz2
plus-7e5386bc62f1f61d3409219292e1ec0d71cbd28e.tar.xz
plus-7e5386bc62f1f61d3409219292e1ec0d71cbd28e.zip
fix code style.
Diffstat (limited to 'src')
-rw-r--r--src/gui/popups/speechbubble.cpp1
-rw-r--r--src/gui/sdlfont.cpp6
-rw-r--r--src/gui/widgets/progressbar.cpp1
-rw-r--r--src/gui/widgets/progressbar.h2
-rw-r--r--src/gui/widgets/windowcontainer.cpp2
-rw-r--r--src/render/graphics.cpp1
-rw-r--r--src/render/graphics_calcImageRect.hpp13
-rw-r--r--src/render/graphics_drawImageRect.hpp6
-rw-r--r--src/render/safeopenglgraphics.cpp12
-rw-r--r--src/utils/physfstools.cpp6
10 files changed, 28 insertions, 22 deletions
diff --git a/src/gui/popups/speechbubble.cpp b/src/gui/popups/speechbubble.cpp
index f1c7c0b9c..3b7a52e34 100644
--- a/src/gui/popups/speechbubble.cpp
+++ b/src/gui/popups/speechbubble.cpp
@@ -29,7 +29,6 @@
#include "gui/widgets/browserbox.h"
#include "gui/widgets/label.h"
#include "gui/widgets/textbox.h"
-#include "gui/widgets/windowcontainer.h"
#include <guichan/font.hpp>
diff --git a/src/gui/sdlfont.cpp b/src/gui/sdlfont.cpp
index 742f3d9aa..c1b090171 100644
--- a/src/gui/sdlfont.cpp
+++ b/src/gui/sdlfont.cpp
@@ -398,15 +398,15 @@ SDLFont::~SDLFont()
TTF_Font *SDLFont::openFont(const char *const name, const int size)
{
// disabled for now because some systems like gentoo cant use it
-//#ifdef USE_SDL2
+// #ifdef USE_SDL2
// SDL_RWops *const rw = MPHYSFSRWOPS_openRead(name);
// if (!rw)
// return nullptr;
// return TTF_OpenFontIndexRW(rw, 1, size, 0);
-//#else
+// #else
return TTF_OpenFontIndex(ResourceManager::getInstance()->getPath(
name).c_str(), size, 0);
-//#endif
+// #endif
}
void SDLFont::loadFont(std::string filename,
diff --git a/src/gui/widgets/progressbar.cpp b/src/gui/widgets/progressbar.cpp
index eddbfe2db..35c270084 100644
--- a/src/gui/widgets/progressbar.cpp
+++ b/src/gui/widgets/progressbar.cpp
@@ -44,7 +44,6 @@ ProgressBar::ProgressBar(const Widget2 *const widget, float progress,
gcn::WidgetListener(),
mFillRect(),
mSkin(nullptr),
- mSkinFill(nullptr),
mProgress(progress),
mProgressToGo(progress),
mBackgroundColor(Theme::getProgressColor(backColor >= 0
diff --git a/src/gui/widgets/progressbar.h b/src/gui/widgets/progressbar.h
index 9b2ab353a..10ebbbd01 100644
--- a/src/gui/widgets/progressbar.h
+++ b/src/gui/widgets/progressbar.h
@@ -32,7 +32,6 @@
#include "localconsts.h"
-class Graphics;
class ImageCollection;
class Skin;
@@ -142,7 +141,6 @@ class ProgressBar final : public gcn::Widget,
private:
ImageRect mFillRect;
Skin *mSkin;
- Skin *mSkinFill;
float mProgress;
float mProgressToGo;
diff --git a/src/gui/widgets/windowcontainer.cpp b/src/gui/widgets/windowcontainer.cpp
index d420e1183..723746ab9 100644
--- a/src/gui/widgets/windowcontainer.cpp
+++ b/src/gui/widgets/windowcontainer.cpp
@@ -61,7 +61,7 @@ void WindowContainer::adjustAfterResize(const int oldScreenWidth,
void WindowContainer::moveWidgetAfter(gcn::Widget *const after,
gcn::Widget *const widget)
{
- WidgetListIterator widgetIter = std::find(
+ const WidgetListIterator widgetIter = std::find(
mWidgets.begin(), mWidgets.end(), widget);
if (widgetIter == mWidgets.end())
diff --git a/src/render/graphics.cpp b/src/render/graphics.cpp
index 7903b6431..1e8cef36e 100644
--- a/src/render/graphics.cpp
+++ b/src/render/graphics.cpp
@@ -28,7 +28,6 @@
#include "graphicsmanager.h"
#include "logger.h"
-#include "resources/image.h"
#include "resources/imagehelper.h"
#include "resources/openglimagehelper.h"
diff --git a/src/render/graphics_calcImageRect.hpp b/src/render/graphics_calcImageRect.hpp
index bf8da2a37..2d97f82c5 100644
--- a/src/render/graphics_calcImageRect.hpp
+++ b/src/render/graphics_calcImageRect.hpp
@@ -21,10 +21,10 @@
*/
-//bool Graphics::calcImageRect(ImageVertexes *const vert,
-// const int x, const int y,
-// const int w, const int h,
-// const ImageRect &imgRect)
+// bool GraphicsX::calcImageRect(ImageVertexes *const vert,
+// const int x, const int y,
+// const int w, const int h,
+// const ImageRect &imgRect)
if (!vert)
return;
@@ -76,7 +76,10 @@ if (topRight)
calcTileVertexesInline(vert, topRight, x + w - trw, y);
}
if (bottomLeft)
- calcTileVertexesInline(vert, bottomLeft, x, y + h - bottomLeft->getHeight());
+{
+ calcTileVertexesInline(vert, bottomLeft,
+ x, y + h - bottomLeft->getHeight());
+}
if (bottomRight)
{
const int brw = bottomRight->getWidth();
diff --git a/src/render/graphics_drawImageRect.hpp b/src/render/graphics_drawImageRect.hpp
index 28157fafd..9ce134ab9 100644
--- a/src/render/graphics_drawImageRect.hpp
+++ b/src/render/graphics_drawImageRect.hpp
@@ -21,9 +21,9 @@
*/
-//void GraphicsX::drawImageRect(const int x, const int y,
-// const int w, const int h,
-// const ImageRect &imgRect)
+// void GraphicsX::drawImageRect(const int x, const int y,
+// const int w, const int h,
+// const ImageRect &imgRect)
BLOCK_START("Graphics::drawImageRect")
diff --git a/src/render/safeopenglgraphics.cpp b/src/render/safeopenglgraphics.cpp
index c988e6825..08638bbe0 100644
--- a/src/render/safeopenglgraphics.cpp
+++ b/src/render/safeopenglgraphics.cpp
@@ -576,14 +576,18 @@ bool SafeOpenGLGraphics::drawNet(const int x1, const int y1,
glBegin(GL_LINES);
for (int y = y1; y < y2; y += height)
{
- glVertex2f(static_cast<float>(x1) + 0.5F, static_cast<float>(y) + 0.5F);
- glVertex2f(static_cast<float>(x2) + 0.5F, static_cast<float>(y) + 0.5F);
+ glVertex2f(static_cast<float>(x1) + 0.5F,
+ static_cast<float>(y) + 0.5F);
+ glVertex2f(static_cast<float>(x2) + 0.5F,
+ static_cast<float>(y) + 0.5F);
}
for (int x = x1; x < x2; x += width)
{
- glVertex2f(static_cast<float>(x) + 0.5F, static_cast<float>(y1) + 0.5F);
- glVertex2f(static_cast<float>(x) + 0.5F, static_cast<float>(y2) + 0.5F);
+ glVertex2f(static_cast<float>(x) + 0.5F,
+ static_cast<float>(y1) + 0.5F);
+ glVertex2f(static_cast<float>(x) + 0.5F,
+ static_cast<float>(y2) + 0.5F);
}
glEnd();
diff --git a/src/utils/physfstools.cpp b/src/utils/physfstools.cpp
index 325f7cddc..d44a37666 100644
--- a/src/utils/physfstools.cpp
+++ b/src/utils/physfstools.cpp
@@ -33,13 +33,17 @@ const char *dirSeparator = nullptr;
namespace PhysFs
{
+#if defined(__native_client__)
void init(const char *const name)
{
-#if defined(__native_client__)
if (!PHYSFS_init("/fakebinary"))
#elif defined(ANDROID)
+ void init(const char *const name A_UNUSED)
+ {
if (!PHYSFS_init((getRealPath(".").append("/fakebinary")).c_str()))
#else
+ void init(const char *const name)
+ {
if (!PHYSFS_init(name))
#endif
{