diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-09-14 20:30:31 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-09-14 20:51:13 +0300 |
commit | b70d1b6d97dcfd78030fb457889e37cb45f6097d (patch) | |
tree | 9f86d6389397887003b920f2335d387398bdcfd6 /src/gui | |
parent | 84499779fcf0c8b5392a88f1c9311775e692ebef (diff) | |
download | ManaVerse-b70d1b6d97dcfd78030fb457889e37cb45f6097d.tar.gz ManaVerse-b70d1b6d97dcfd78030fb457889e37cb45f6097d.tar.bz2 ManaVerse-b70d1b6d97dcfd78030fb457889e37cb45f6097d.tar.xz ManaVerse-b70d1b6d97dcfd78030fb457889e37cb45f6097d.zip |
Fix code style.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/palette.h | 4 | ||||
-rw-r--r-- | src/gui/unregisterdialog.cpp | 4 | ||||
-rw-r--r-- | src/gui/unregisterdialog.h | 4 | ||||
-rw-r--r-- | src/gui/userpalette.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/layout.cpp | 12 |
5 files changed, 13 insertions, 13 deletions
diff --git a/src/gui/palette.h b/src/gui/palette.h index 836ec77e6..38bd83ffb 100644 --- a/src/gui/palette.h +++ b/src/gui/palette.h @@ -179,8 +179,8 @@ class Palette int delay; int committedDelay; - void set(int type0, gcn::Color& color0, GradientType grad0, - int delay0) + void set(const int type0, const gcn::Color &color0, + const GradientType grad0, const int delay0) { ColorElem::type = type0; ColorElem::color = color0; diff --git a/src/gui/unregisterdialog.cpp b/src/gui/unregisterdialog.cpp index 59441f9e1..edceb54e8 100644 --- a/src/gui/unregisterdialog.cpp +++ b/src/gui/unregisterdialog.cpp @@ -47,11 +47,11 @@ UnRegisterDialog::UnRegisterDialog(LoginData *const data): Window(_("Unregister"), true, nullptr, "unregister.xml"), ActionListener(), + mLoginData(data), mPasswordField(new PasswordField(mLoginData->password)), mUnRegisterButton(new Button(_("Unregister"), "unregister", this)), mCancelButton(new Button(_("Cancel"), "cancel", this)), - mWrongDataNoticeListener(new WrongDataNoticeListener), - mLoginData(data) + mWrongDataNoticeListener(new WrongDataNoticeListener) { gcn::Label *const userLabel = new Label(strprintf(_("Name: %s"), mLoginData->username.c_str())); diff --git a/src/gui/unregisterdialog.h b/src/gui/unregisterdialog.h index 8a3be85d9..de783a410 100644 --- a/src/gui/unregisterdialog.h +++ b/src/gui/unregisterdialog.h @@ -60,14 +60,14 @@ class UnRegisterDialog : public Window, public gcn::ActionListener void action(const gcn::ActionEvent &event); private: + LoginData *mLoginData; + gcn::TextField *mPasswordField; gcn::Button *mUnRegisterButton; gcn::Button *mCancelButton; WrongDataNoticeListener *mWrongDataNoticeListener; - - LoginData *mLoginData; }; #endif diff --git a/src/gui/userpalette.cpp b/src/gui/userpalette.cpp index 69c2b7093..cb4aa3587 100644 --- a/src/gui/userpalette.cpp +++ b/src/gui/userpalette.cpp @@ -298,7 +298,7 @@ void UserPalette::addColor(const unsigned type, const unsigned rgb, rgbValue = atox(rgbString); else rgbValue = atoi(rgbString.c_str()); - gcn::Color trueCol = rgbValue; + const gcn::Color &trueCol = rgbValue; grad = static_cast<GradientType>(config.getValue(configName + "Gradient", static_cast<int>(grad))); delay = config.getValueInt(configName + "Delay", delay); diff --git a/src/gui/widgets/layout.cpp b/src/gui/widgets/layout.cpp index 96c6dffee..b0b194bde 100644 --- a/src/gui/widgets/layout.cpp +++ b/src/gui/widgets/layout.cpp @@ -88,7 +88,7 @@ void LayoutCell::computeSizes() std::vector <std::vector <LayoutCell *> >::const_iterator i = mArray->mCells.begin(); - std::vector <std::vector <LayoutCell *> >::const_iterator + const std::vector <std::vector <LayoutCell *> >::const_iterator i_end = mArray->mCells.end(); while (i != i_end) { @@ -116,12 +116,12 @@ LayoutArray::~LayoutArray() { std::vector <std::vector <LayoutCell *> >::iterator i = mCells.begin(); - std::vector <std::vector <LayoutCell *> >::iterator + const std::vector <std::vector <LayoutCell *> >::iterator i_end = mCells.end(); while (i != i_end) { std::vector< LayoutCell * >::iterator j = i->begin(); - std::vector< LayoutCell * >::iterator j_end = i->end(); + const std::vector< LayoutCell * >::iterator j_end = i->end(); while (j != j_end) { delete *j; @@ -162,7 +162,7 @@ void LayoutArray::resizeGrid(int w, const int h) std::vector <std::vector <LayoutCell *> >::iterator i = mCells.begin(); - std::vector <std::vector <LayoutCell *> >::iterator + const std::vector <std::vector <LayoutCell *> >::iterator i_end = mCells.end(); while (i != i_end) { @@ -187,7 +187,7 @@ void LayoutArray::matchColWidth(const int n1, const int n2) { resizeGrid(std::max(n1, n2) + 1, 0); const std::vector<int> widths = getSizes(0, Layout::AUTO_DEF); - int s = std::max(widths[n1], widths[n2]); + const int s = std::max(widths[n1], widths[n2]); mSizes[0][n1] = s; mSizes[0][n2] = s; } @@ -273,7 +273,7 @@ std::vector<int> LayoutArray::getSizes(const int dim, int upp) const { for (int gridX = 0; gridX < gridW; ++gridX) { - LayoutCell const *cell = mCells[gridY][gridX]; + const LayoutCell *const cell = mCells[gridY][gridX]; if (!cell || cell->mType == LayoutCell::NONE) continue; |