diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-08-28 01:59:04 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-08-28 01:59:04 +0300 |
commit | c79403e1341ac533df1771b866d1f5cee15e12b5 (patch) | |
tree | 5bed6dfb44f7fce0432bd7a7a28d2d23db07ce80 /src/gui/setup_video.cpp | |
parent | 7c79aa2b8e484319e3e511fa21db6d2448347024 (diff) | |
download | mv-c79403e1341ac533df1771b866d1f5cee15e12b5.tar.gz mv-c79403e1341ac533df1771b866d1f5cee15e12b5.tar.bz2 mv-c79403e1341ac533df1771b866d1f5cee15e12b5.tar.xz mv-c79403e1341ac533df1771b866d1f5cee15e12b5.zip |
Add const to more classes.
Diffstat (limited to 'src/gui/setup_video.cpp')
-rw-r--r-- | src/gui/setup_video.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gui/setup_video.cpp b/src/gui/setup_video.cpp index 68e4c8e76..6daf87bf2 100644 --- a/src/gui/setup_video.cpp +++ b/src/gui/setup_video.cpp @@ -132,7 +132,8 @@ static bool modeSorter(std::string mode1, std::string mode2) ModeListModel::ModeListModel() { /* Get available fullscreen/hardware modes */ - SDL_Rect **modes = SDL_ListModes(nullptr, SDL_FULLSCREEN | SDL_HWSURFACE); + SDL_Rect **const modes = SDL_ListModes(nullptr, + SDL_FULLSCREEN | SDL_HWSURFACE); /* Check which modes are available */ if (modes == static_cast<SDL_Rect **>(nullptr)) @@ -169,7 +170,7 @@ ModeListModel::ModeListModel() void ModeListModel::addCustomMode(std::string mode) { StringVectCIter it = mVideoModes.begin(); - StringVectCIter it_end = mVideoModes.end(); + const StringVectCIter it_end = mVideoModes.end(); while (it != it_end) { if (*it == mode) @@ -241,7 +242,7 @@ Setup_Video::Setup_Video(): { setName(_("Video")); - ScrollArea *scrollArea = new ScrollArea(mModeList, + ScrollArea *const scrollArea = new ScrollArea(mModeList, true, "setup_video_background.xml"); scrollArea->setWidth(150); scrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER); @@ -548,7 +549,7 @@ void Setup_Video::action(const gcn::ActionEvent &event) } else if (id == "detect") { - int val = graphicsManager.startDetection(); + const int val = graphicsManager.startDetection(); if (val >= 0 && val <= 2) mOpenGLDropDown->setSelected(val); } |