summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-09-04 23:47:11 +0300
committerAndrei Karas <akaras@inbox.ru>2012-09-04 23:47:11 +0300
commitf24ddad3fa0f843eb29a281426151cf1a5f31f4b (patch)
tree6f3faaf38f069f1e88435b7c976ff4070b7a1dcb /src/gui
parent3a407bb6b73a186eafd99bcec570f88097c4b2e1 (diff)
downloadplus-f24ddad3fa0f843eb29a281426151cf1a5f31f4b.tar.gz
plus-f24ddad3fa0f843eb29a281426151cf1a5f31f4b.tar.bz2
plus-f24ddad3fa0f843eb29a281426151cf1a5f31f4b.tar.xz
plus-f24ddad3fa0f843eb29a281426151cf1a5f31f4b.zip
add const to more classes,
fix other small style issues.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/quitdialog.cpp2
-rw-r--r--src/gui/sdlfont.cpp4
-rw-r--r--src/gui/shopwindow.cpp1
-rw-r--r--src/gui/theme.cpp2
-rw-r--r--src/gui/updaterwindow.cpp8
-rw-r--r--src/gui/updaterwindow.h4
6 files changed, 10 insertions, 11 deletions
diff --git a/src/gui/quitdialog.cpp b/src/gui/quitdialog.cpp
index c84ddc122..d5a4d8504 100644
--- a/src/gui/quitdialog.cpp
+++ b/src/gui/quitdialog.cpp
@@ -126,7 +126,7 @@ void QuitDialog::action(const gcn::ActionEvent &event)
{
if (viewport)
{
- Map *const map = viewport->getCurrentMap();
+ const Map *const map = viewport->getCurrentMap();
if (map)
map->saveExtraLayer();
}
diff --git a/src/gui/sdlfont.cpp b/src/gui/sdlfont.cpp
index ed3a6b295..2dbf880a5 100644
--- a/src/gui/sdlfont.cpp
+++ b/src/gui/sdlfont.cpp
@@ -100,7 +100,7 @@ SDLFont::SDLFont(std::string filename, const int size, const int style) :
mCreateCounter(0),
mDeleteCounter(0)
{
- ResourceManager *const resman = ResourceManager::getInstance();
+ const ResourceManager *const resman = ResourceManager::getInstance();
if (fontCounter == 0 && TTF_Init() == -1)
{
@@ -151,7 +151,7 @@ SDLFont::~SDLFont()
void SDLFont::loadFont(std::string filename, const int size, const int style)
{
- ResourceManager *const resman = ResourceManager::getInstance();
+ const ResourceManager *const resman = ResourceManager::getInstance();
if (fontCounter == 0 && TTF_Init() == -1)
{
diff --git a/src/gui/shopwindow.cpp b/src/gui/shopwindow.cpp
index a75b8d810..9ebe7a2a5 100644
--- a/src/gui/shopwindow.cpp
+++ b/src/gui/shopwindow.cpp
@@ -400,7 +400,6 @@ void ShopWindow::saveList()
std::ofstream shopFile;
std::string shopListName = Client::getServerConfigDirectory()
+ "/shoplist.txt";
- std::list<int> procesList;
std::map<int, ShopItem*> mapItems;
shopFile.open(shopListName.c_str(), std::ios::binary);
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp
index 91a6720e0..679b975e0 100644
--- a/src/gui/theme.cpp
+++ b/src/gui/theme.cpp
@@ -50,7 +50,7 @@ Theme *Theme::mInstance = nullptr;
// Set the theme path...
static void initDefaultThemePath()
{
- ResourceManager *const resman = ResourceManager::getInstance();
+ const ResourceManager *const resman = ResourceManager::getInstance();
defaultThemePath = branding.getStringValue("guiThemePath");
logger->log("defaultThemePath: " + defaultThemePath);
diff --git a/src/gui/updaterwindow.cpp b/src/gui/updaterwindow.cpp
index 71e2a1022..496e651b3 100644
--- a/src/gui/updaterwindow.cpp
+++ b/src/gui/updaterwindow.cpp
@@ -514,7 +514,7 @@ void UpdaterWindow::download()
void UpdaterWindow::loadUpdates()
{
- ResourceManager *const resman = ResourceManager::getInstance();
+ const ResourceManager *const resman = ResourceManager::getInstance();
if (mUpdateFiles.empty())
{ // updates not downloaded
@@ -540,7 +540,7 @@ void UpdaterWindow::loadUpdates()
void UpdaterWindow::loadLocalUpdates(const std::string &dir)
{
- ResourceManager *const resman = ResourceManager::getInstance();
+ const ResourceManager *const resman = ResourceManager::getInstance();
std::vector<updateFile> updateFiles
= loadXMLFile(dir + "/" + xmlUpdateFile);
@@ -564,7 +564,7 @@ void UpdaterWindow::loadLocalUpdates(const std::string &dir)
}
void UpdaterWindow::loadManaPlusUpdates(const std::string &dir,
- ResourceManager *const resman)
+ const ResourceManager *const resman)
{
std::string fixPath = dir + "/fix";
std::vector<updateFile> updateFiles
@@ -584,7 +584,7 @@ void UpdaterWindow::loadManaPlusUpdates(const std::string &dir,
}
}
-void UpdaterWindow::addUpdateFile(ResourceManager *const resman,
+void UpdaterWindow::addUpdateFile(const ResourceManager *const resman,
const std::string &path,
const std::string &fixPath,
const std::string &file,
diff --git a/src/gui/updaterwindow.h b/src/gui/updaterwindow.h
index 616b0d824..c7534dece 100644
--- a/src/gui/updaterwindow.h
+++ b/src/gui/updaterwindow.h
@@ -119,14 +119,14 @@ class UpdaterWindow : public Window,
static void loadLocalUpdates(const std::string &dir);
- static void addUpdateFile(ResourceManager *const resman,
+ static void addUpdateFile(const ResourceManager *const resman,
const std::string &path,
const std::string &fixPath,
const std::string &file,
const bool append);
static void loadManaPlusUpdates(const std::string &dir,
- ResourceManager *const resman);
+ const ResourceManager *const resman);
int updateState;