From a74191bc53df482ce637ba585016105673add785 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 23 Jul 2011 03:12:59 +0300 Subject: Fix some code style and compilation warnings. --- src/graphics.cpp | 3 ++- src/gui/palette.h | 5 +++++ src/gui/updatewindow.cpp | 5 +++-- src/localplayer.cpp | 1 - src/map.h | 2 +- src/resources/resourcemanager.cpp | 4 ++-- 6 files changed, 13 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/graphics.cpp b/src/graphics.cpp index c5163f791..6a6760c36 100644 --- a/src/graphics.cpp +++ b/src/graphics.cpp @@ -685,7 +685,8 @@ int Graphics::SDL_FakeUpperBlit (SDL_Surface *src, SDL_Rect *srcrect, /* If the destination rectangle is NULL, use the entire dest surface */ if (dstrect == NULL) { - fulldst.x = fulldst.y = 0; + fulldst.x = 0; + fulldst.y = 0; dstrect = &fulldst; } diff --git a/src/gui/palette.h b/src/gui/palette.h index f89b31fca..9409bfc06 100644 --- a/src/gui/palette.h +++ b/src/gui/palette.h @@ -158,8 +158,13 @@ class Palette ColorElem() { type = 0; + color = 0; + testColor = 0; + committedColor = 0; text = ""; ch = 0; + grad = STATIC; + committedGrad = STATIC; gradientIndex = 0; delay = 0; committedDelay = 0; diff --git a/src/gui/updatewindow.cpp b/src/gui/updatewindow.cpp index 27718928d..eb5471e2a 100644 --- a/src/gui/updatewindow.cpp +++ b/src/gui/updatewindow.cpp @@ -420,8 +420,9 @@ void UpdaterWindow::download() } if (mDownloadStatus == UPDATE_PATCH) { - mDownload = new Net::Download(this, "http://manaplus.evolonline.org/update/" - + mCurrentFile, updateProgress, true); + mDownload = new Net::Download(this, + "http://manaplus.evolonline.org/update/" + mCurrentFile, + updateProgress, true); } else { diff --git a/src/localplayer.cpp b/src/localplayer.cpp index 95f2dc83d..124f2dfe1 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -3089,7 +3089,6 @@ void LocalPlayer::setHome() void LocalPlayer::saveHomes() { std::string homeStr; - std::string buf; std::stringstream ss(homeStr); for (std::map::iterator iter = mHomes.begin(); diff --git a/src/map.h b/src/map.h index 7ddd5db85..776f00ebe 100644 --- a/src/map.h +++ b/src/map.h @@ -50,7 +50,7 @@ class SpecialLayer; class MapItem; class ObjectsLayer; -struct ImageVertexes; +class ImageVertexes; typedef std::vector Tilesets; typedef std::vector Layers; diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp index ad188ec1c..92c18fa2a 100644 --- a/src/resources/resourcemanager.cpp +++ b/src/resources/resourcemanager.cpp @@ -256,7 +256,7 @@ void ResourceManager::searchAndAddArchives(const std::string &path, if (len > ext.length() && !ext.compare((*i) + (len - ext.length()))) { - std::string file, realPath, archive, realFixPath; + std::string file, realPath, archive; file = path + (*i); realPath = std::string(PHYSFS_getRealDir(file.c_str())); @@ -281,7 +281,7 @@ void ResourceManager::searchAndRemoveArchives(const std::string &path, if (len > ext.length() && !ext.compare((*i) + (len - ext.length()))) { - std::string file, realPath, archive, realFixPath; + std::string file, realPath, archive; file = path + (*i); realPath = std::string(PHYSFS_getRealDir(file.c_str())); -- cgit v1.2.3-60-g2f50