From 62ffd2023d9073e452fe2e2f50cf6b2f11224d6f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 21 Aug 2012 22:44:44 +0300 Subject: next code style changes. --- src/gui/updaterwindow.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/gui/updaterwindow.cpp') 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)->getActionId(); + const int actionId = static_cast(&keyEvent)->getActionId(); - if (actionId == Input::KEY_GUI_CANCEL) + if (actionId == static_cast(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(Input::KEY_GUI_SELECT) + || actionId == static_cast(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(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( + 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 updateFiles = loadXMLFile(fixPath + "/" + xmlUpdateFile); - for (unsigned int updateIndex = 0, sz = updateFiles.size(); - updateIndex < sz; updateIndex ++) + for (unsigned int updateIndex = 0, sz = static_cast( + updateFiles.size()); updateIndex < sz; updateIndex ++) { std::string name = updateFiles[updateIndex].name; if (strStartWith(name, "manaplus_")) -- cgit v1.2.3-60-g2f50