summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/sdlfont.cpp7
-rw-r--r--src/gui/serverdialog.cpp4
-rw-r--r--src/gui/skilldialog.cpp4
-rw-r--r--src/gui/widgets/button.cpp4
-rw-r--r--src/gui/widgets/namesmodel.cpp2
-rw-r--r--src/gui/widgets/setupitem.cpp3
-rw-r--r--src/resources/sdlimagehelper.cpp3
7 files changed, 13 insertions, 14 deletions
diff --git a/src/gui/sdlfont.cpp b/src/gui/sdlfont.cpp
index 3ece4b849..181bcef87 100644
--- a/src/gui/sdlfont.cpp
+++ b/src/gui/sdlfont.cpp
@@ -96,7 +96,6 @@ class SDLTextChunk final
|| color.b != color2.b)
{ // outlining
SDL_Color sdlCol2;
- const SDL_PixelFormat * const format = surface->format;
SDL_Surface *background = imageHelper->create32BitSurface(
width, height);
if (!background)
@@ -120,8 +119,10 @@ class SDLTextChunk final
}
SDL_Rect rect =
{
- OUTLINE_SIZE, 0,
- surface->w, surface->h
+ OUTLINE_SIZE,
+ 0,
+ static_cast<Uint16>(surface->w),
+ static_cast<Uint16>(surface->h)
};
// SDL_SetAlpha(surface2, 0, SDL_ALPHA_OPAQUE);
SDL_gfxBlitRGBA(surface2, nullptr, background, &rect);
diff --git a/src/gui/serverdialog.cpp b/src/gui/serverdialog.cpp
index 4ba2bca1d..5e7c80515 100644
--- a/src/gui/serverdialog.cpp
+++ b/src/gui/serverdialog.cpp
@@ -476,10 +476,6 @@ void ServerDialog::valueChanged(const gcn::SelectionEvent &)
mDeleteButton->setEnabled(false);
return;
}
-
- // Update the server and post fields according to the new selection
- const ServerInfo &myServer = mServersListModel->getServer(index);
-
mDeleteButton->setEnabled(true);
}
diff --git a/src/gui/skilldialog.cpp b/src/gui/skilldialog.cpp
index 00d26b17c..35e3e7422 100644
--- a/src/gui/skilldialog.cpp
+++ b/src/gui/skilldialog.cpp
@@ -726,9 +726,9 @@ SkillData *SkillInfo::getData(const int level1)
return (*it).second;
}
-SkillData *SkillInfo::getData1(const int level)
+SkillData *SkillInfo::getData1(const int lev)
{
- SkillDataMapIter it = dataMap.find(level);
+ SkillDataMapIter it = dataMap.find(lev);
if (it == dataMap.end())
return dataMap[0];
return (*it).second;
diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp
index f0337766f..265815929 100644
--- a/src/gui/widgets/button.cpp
+++ b/src/gui/widgets/button.cpp
@@ -377,8 +377,8 @@ void Button::draw(gcn::Graphics *graphics)
const int width = font->getWidth(mCaption);
if (mImages)
{
- const int width = width + mImageWidth + spacing;
- imageX = getWidth() / 2 - width / 2;
+ const int w = width + mImageWidth + spacing;
+ imageX = (getWidth() - w) / 2;
textX = imageX + mImageWidth + spacing - width / 2;
}
else
diff --git a/src/gui/widgets/namesmodel.cpp b/src/gui/widgets/namesmodel.cpp
index 299eed355..186976d13 100644
--- a/src/gui/widgets/namesmodel.cpp
+++ b/src/gui/widgets/namesmodel.cpp
@@ -52,6 +52,6 @@ std::string NamesModel::getElementAt(int i)
void NamesModel::fillFromArray(const char *const *const arr, std::size_t sz)
{
- for (int f = 0; f < sz; f ++)
+ for (size_t f = 0; f < sz; f ++)
mNames.push_back(gettext(arr[f]));
}
diff --git a/src/gui/widgets/setupitem.cpp b/src/gui/widgets/setupitem.cpp
index d3c46e0ec..dd2d16caf 100644
--- a/src/gui/widgets/setupitem.cpp
+++ b/src/gui/widgets/setupitem.cpp
@@ -562,7 +562,8 @@ SetupItemDropDown::SetupItemDropDown(std::string text,
mHorizont(nullptr),
mLabel(nullptr),
mModel(model),
- mDropDown(nullptr)
+ mDropDown(nullptr),
+ mWidth(width)
{
mValueType = VSTR;
createControls();
diff --git a/src/resources/sdlimagehelper.cpp b/src/resources/sdlimagehelper.cpp
index abc9ca068..fb613d9cf 100644
--- a/src/resources/sdlimagehelper.cpp
+++ b/src/resources/sdlimagehelper.cpp
@@ -129,7 +129,8 @@ Image *SDLImageHelper::load(SDL_Surface *const tmpImage)
}
Image *SDLImageHelper::createTextSurface(SDL_Surface *const tmpImage,
- int width, int height,
+ int width A_UNUSED,
+ int height A_UNUSED,
const float alpha)
{
if (!tmpImage)