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 | |
parent | 84499779fcf0c8b5392a88f1c9311775e692ebef (diff) | |
download | plus-b70d1b6d97dcfd78030fb457889e37cb45f6097d.tar.gz plus-b70d1b6d97dcfd78030fb457889e37cb45f6097d.tar.bz2 plus-b70d1b6d97dcfd78030fb457889e37cb45f6097d.tar.xz plus-b70d1b6d97dcfd78030fb457889e37cb45f6097d.zip |
Fix code style.
Diffstat (limited to 'src')
-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 | ||||
-rw-r--r-- | src/guichan/widget.cpp | 2 | ||||
-rw-r--r-- | src/test/testmain.cpp | 4 |
7 files changed, 16 insertions, 16 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; diff --git a/src/guichan/widget.cpp b/src/guichan/widget.cpp index 87d6fb635..8fa7cf65a 100644 --- a/src/guichan/widget.cpp +++ b/src/guichan/widget.cpp @@ -110,7 +110,7 @@ namespace gcn void Widget::drawFrame(Graphics* graphics) { - const Color faceColor = getBaseColor(); + const Color &faceColor = getBaseColor(); Color highlightColor = faceColor + 0x303030; Color shadowColor = faceColor - 0x303030; const int alpha = getBaseColor().a; diff --git a/src/test/testmain.cpp b/src/test/testmain.cpp index 5e94f09d5..61c08f442 100644 --- a/src/test/testmain.cpp +++ b/src/test/testmain.cpp @@ -277,7 +277,7 @@ int TestMain::invokeFastOpenGLRenderTest(std::string test) #if defined USE_OPENGL mConfig.setValue("opengl", 1); mConfig.write(); - int ret = execFileWait(fileName, fileName, "-t", test, 30); + const int ret = execFileWait(fileName, fileName, "-t", test, 30); log->log("%s: %d", test.c_str(), ret); return ret; #else @@ -290,7 +290,7 @@ int TestMain::invokeSafeOpenGLRenderTest(std::string test) #if defined USE_OPENGL mConfig.setValue("opengl", 2); mConfig.write(); - int ret = execFileWait(fileName, fileName, "-t", test, 30); + const int ret = execFileWait(fileName, fileName, "-t", test, 30); log->log("%s: %d", test.c_str(), ret); return ret; #else |