summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/graphics.cpp15
-rw-r--r--src/gui/sdlfont.cpp4
-rw-r--r--src/utils/stringutils.cpp2
3 files changed, 11 insertions, 10 deletions
diff --git a/src/graphics.cpp b/src/graphics.cpp
index 1e2fc0fb4..9912a3e7b 100644
--- a/src/graphics.cpp
+++ b/src/graphics.cpp
@@ -620,7 +620,7 @@ int Graphics::SDL_FakeUpperBlit (SDL_Surface *src, SDL_Rect *srcrect,
}
/* clip the source rectangle to the source surface */
- if(srcrect)
+ if (srcrect)
{
int maxw, maxh;
@@ -650,7 +650,8 @@ int Graphics::SDL_FakeUpperBlit (SDL_Surface *src, SDL_Rect *srcrect,
}
else
{
- srcx = srcy = 0;
+ srcx = 0;
+ srcy = 0;
w = src->w;
h = src->h;
}
@@ -661,29 +662,29 @@ int Graphics::SDL_FakeUpperBlit (SDL_Surface *src, SDL_Rect *srcrect,
int dx, dy;
dx = clip->x - dstrect->x;
- if(dx > 0)
+ if (dx > 0)
{
w -= dx;
dstrect->x += dx;
srcx += dx;
}
dx = dstrect->x + w - clip->x - clip->w;
- if(dx > 0)
+ if (dx > 0)
w -= dx;
dy = clip->y - dstrect->y;
- if(dy > 0)
+ if (dy > 0)
{
h -= dy;
dstrect->y += dy;
srcy += dy;
}
dy = dstrect->y + h - clip->y - clip->h;
- if(dy > 0)
+ if (dy > 0)
h -= dy;
}
- if(w > 0 && h > 0)
+ if (w > 0 && h > 0)
{
srcrect->x = srcx;
srcrect->y = srcy;
diff --git a/src/gui/sdlfont.cpp b/src/gui/sdlfont.cpp
index ab20eee97..862ec8434 100644
--- a/src/gui/sdlfont.cpp
+++ b/src/gui/sdlfont.cpp
@@ -181,8 +181,8 @@ void SDLFont::clear()
}
void SDLFont::drawString(gcn::Graphics *graphics,
- const std::string &text,
- int x, int y)
+ const std::string &text,
+ int x, int y)
{
if (text.empty())
return;
diff --git a/src/utils/stringutils.cpp b/src/utils/stringutils.cpp
index a7e1b6c7d..8ae155bf7 100644
--- a/src/utils/stringutils.cpp
+++ b/src/utils/stringutils.cpp
@@ -448,7 +448,7 @@ std::string getLang()
std::string lang(lng);
int dot = lang.find(".");
- if (dot == std::string::npos && dot > 0)
+ if (dot == (signed)std::string::npos)
return lang;
return lang.substr(0, dot);