diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-08-21 22:44:44 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-08-21 23:18:20 +0300 |
commit | 62ffd2023d9073e452fe2e2f50cf6b2f11224d6f (patch) | |
tree | 8c45c7c16b0c20ac6a7b722d69c148149e6b651f /src/gui/updaterwindow.cpp | |
parent | cfa5391c1be51ef49380e398a72c813255d6316e (diff) | |
download | mv-62ffd2023d9073e452fe2e2f50cf6b2f11224d6f.tar.gz mv-62ffd2023d9073e452fe2e2f50cf6b2f11224d6f.tar.bz2 mv-62ffd2023d9073e452fe2e2f50cf6b2f11224d6f.tar.xz mv-62ffd2023d9073e452fe2e2f50cf6b2f11224d6f.zip |
next code style changes.
Diffstat (limited to 'src/gui/updaterwindow.cpp')
-rw-r--r-- | src/gui/updaterwindow.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/gui/updaterwindow.cpp b/src/gui/updaterwindow.cpp index 49977ae4b..81fe7a9cd 100644 --- a/src/gui/updaterwindow.cpp +++ b/src/gui/updaterwindow.cpp @@ -263,15 +263,15 @@ void UpdaterWindow::action(const gcn::ActionEvent &event) void UpdaterWindow::keyPressed(gcn::KeyEvent &keyEvent) { - int actionId = static_cast<KeyEvent*>(&keyEvent)->getActionId(); + const int actionId = static_cast<KeyEvent*>(&keyEvent)->getActionId(); - if (actionId == Input::KEY_GUI_CANCEL) + if (actionId == static_cast<int>(Input::KEY_GUI_CANCEL)) { action(gcn::ActionEvent(nullptr, mCancelButton->getActionEventId())); Client::setState(STATE_LOGIN); } - else if (actionId == Input::KEY_GUI_SELECT - || actionId == Input::KEY_GUI_SELECT2) + else if (actionId == static_cast<int>(Input::KEY_GUI_SELECT) + || actionId == static_cast<int>(Input::KEY_GUI_SELECT2)) { if (mDownloadStatus == UPDATE_COMPLETE || mDownloadStatus == UPDATE_ERROR) @@ -534,7 +534,7 @@ void UpdaterWindow::loadUpdates() } std::string fixPath = mUpdatesDir + "/fix"; - const unsigned sz = mUpdateFiles.size(); + const unsigned sz = static_cast<unsigned>(mUpdateFiles.size()); for (mUpdateIndex = 0; mUpdateIndex < sz; mUpdateIndex++) { UpdaterWindow::addUpdateFile(resman, mUpdatesDir, fixPath, @@ -559,8 +559,8 @@ void UpdaterWindow::loadLocalUpdates(std::string dir) } std::string fixPath = dir + "/fix"; - for (unsigned int updateIndex = 0, sz = updateFiles.size(); - updateIndex < sz; updateIndex ++) + for (unsigned int updateIndex = 0, sz = static_cast<unsigned int>( + updateFiles.size()); updateIndex < sz; updateIndex ++) { UpdaterWindow::addUpdateFile(resman, dir, fixPath, updateFiles[updateIndex].name, false); @@ -575,8 +575,8 @@ void UpdaterWindow::loadManaPlusUpdates(std::string dir, std::vector<updateFile> updateFiles = loadXMLFile(fixPath + "/" + xmlUpdateFile); - for (unsigned int updateIndex = 0, sz = updateFiles.size(); - updateIndex < sz; updateIndex ++) + for (unsigned int updateIndex = 0, sz = static_cast<unsigned int>( + updateFiles.size()); updateIndex < sz; updateIndex ++) { std::string name = updateFiles[updateIndex].name; if (strStartWith(name, "manaplus_")) |