From 987a88ffb5bd00e7996e8267b2bd3c9ed48a40e2 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 5 Sep 2012 00:53:33 +0300 Subject: another some const fixes. --- src/gui/widgets/extendednamesmodel.cpp | 2 +- src/gui/widgets/extendednamesmodel.h | 2 +- src/gui/widgets/slider.cpp | 2 +- src/gui/widgets/slider.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/gui/widgets') diff --git a/src/gui/widgets/extendednamesmodel.cpp b/src/gui/widgets/extendednamesmodel.cpp index 11c594321..083ce938e 100644 --- a/src/gui/widgets/extendednamesmodel.cpp +++ b/src/gui/widgets/extendednamesmodel.cpp @@ -51,7 +51,7 @@ std::string ExtendedNamesModel::getElementAt(int i) return mNames[i]; } -Image *ExtendedNamesModel::getImageAt(int i) +const Image *ExtendedNamesModel::getImageAt(int i) { if (i >= static_cast(mImages.size()) || i < 0) return nullptr; diff --git a/src/gui/widgets/extendednamesmodel.h b/src/gui/widgets/extendednamesmodel.h index 5a15949a9..be59c7e20 100644 --- a/src/gui/widgets/extendednamesmodel.h +++ b/src/gui/widgets/extendednamesmodel.h @@ -38,7 +38,7 @@ class ExtendedNamesModel : public ExtendedListModel virtual std::string getElementAt(int i); - virtual Image *getImageAt(int i); + virtual const Image *getImageAt(int i); StringVect &getNames() { return mNames; } diff --git a/src/gui/widgets/slider.cpp b/src/gui/widgets/slider.cpp index da6cb31f6..edc215b07 100644 --- a/src/gui/widgets/slider.cpp +++ b/src/gui/widgets/slider.cpp @@ -177,7 +177,7 @@ void Slider::draw(gcn::Graphics *graphics) drawMarker(graphics); } -void Slider::drawMarker(gcn::Graphics *const graphics) +void Slider::drawMarker(gcn::Graphics *const graphics) const { const Image *const img = (mHasMouse ? buttons[1].grid[HGRIP] : buttons[0].grid[HGRIP]); diff --git a/src/gui/widgets/slider.h b/src/gui/widgets/slider.h index 7ef121346..95d23f83e 100644 --- a/src/gui/widgets/slider.h +++ b/src/gui/widgets/slider.h @@ -64,7 +64,7 @@ class Slider : public gcn::Slider /** * Draws the marker. */ - void drawMarker(gcn::Graphics *const graphics); + void drawMarker(gcn::Graphics *const graphics) const; /** * Called when the mouse enteres the widget area. -- cgit v1.2.3-70-g09d2