From c79403e1341ac533df1771b866d1f5cee15e12b5 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 28 Aug 2012 01:59:04 +0300 Subject: Add const to more classes. --- src/gui/setup_video.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/gui/setup_video.cpp') 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(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); } -- cgit v1.2.3-70-g09d2