From e7d34cc22d3bfd0dd44b014af1bd5fdc891141aa Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 7 Apr 2013 19:22:02 +0300 Subject: fix more style, add consts. --- src/gui/widgets/button.cpp | 2 +- src/gui/widgets/checkbox.cpp | 2 +- src/gui/widgets/guitable.cpp | 2 +- src/gui/widgets/guitable.h | 2 +- src/gui/widgets/radiobutton.cpp | 2 +- src/gui/widgets/tab.cpp | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/gui/widgets') diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp index 83c5f2c95..16f5b7db3 100644 --- a/src/gui/widgets/button.cpp +++ b/src/gui/widgets/button.cpp @@ -264,7 +264,7 @@ void Button::updateAlpha() Skin *skin = button[mode]; if (skin) { - ImageRect &rect = skin->getBorder(); + const ImageRect &rect = skin->getBorder(); Image *image = rect.grid[a]; if (image) image->setAlpha(mAlpha); diff --git a/src/gui/widgets/checkbox.cpp b/src/gui/widgets/checkbox.cpp index ac0a226ee..77f81f72b 100644 --- a/src/gui/widgets/checkbox.cpp +++ b/src/gui/widgets/checkbox.cpp @@ -112,7 +112,7 @@ void CheckBox::updateAlpha() mAlpha = alpha; if (mSkin) { - ImageRect &rect = mSkin->getBorder(); + const ImageRect &rect = mSkin->getBorder(); for (int a = 0; a < 6; a ++) { Image *const image = rect.grid[a]; diff --git a/src/gui/widgets/guitable.cpp b/src/gui/widgets/guitable.cpp index e40248121..16604d760 100644 --- a/src/gui/widgets/guitable.cpp +++ b/src/gui/widgets/guitable.cpp @@ -121,7 +121,7 @@ GuiTable::~GuiTable() mModel = nullptr; } -TableModel *GuiTable::getModel() const +const TableModel *GuiTable::getModel() const { return mModel; } diff --git a/src/gui/widgets/guitable.h b/src/gui/widgets/guitable.h index 9657de9f8..0b2b4462c 100644 --- a/src/gui/widgets/guitable.h +++ b/src/gui/widgets/guitable.h @@ -66,7 +66,7 @@ public: /** * Retrieves the active table model */ - TableModel *getModel() const A_WARN_UNUSED; + const TableModel *getModel() const A_WARN_UNUSED; /** * Sets the table model diff --git a/src/gui/widgets/radiobutton.cpp b/src/gui/widgets/radiobutton.cpp index 1a6b9df70..06391217d 100644 --- a/src/gui/widgets/radiobutton.cpp +++ b/src/gui/widgets/radiobutton.cpp @@ -92,7 +92,7 @@ void RadioButton::updateAlpha() mAlpha = alpha; if (mSkin) { - ImageRect &rect = mSkin->getBorder(); + const ImageRect &rect = mSkin->getBorder(); for (int a = 0; a < 4; a ++) { Image *const image = rect.grid[a]; diff --git a/src/gui/widgets/tab.cpp b/src/gui/widgets/tab.cpp index 35a9a17b4..18e2510ee 100644 --- a/src/gui/widgets/tab.cpp +++ b/src/gui/widgets/tab.cpp @@ -141,7 +141,7 @@ void Tab::updateAlpha() Skin *skin = tabImg[t]; if (skin) { - ImageRect &rect = skin->getBorder(); + const ImageRect &rect = skin->getBorder(); Image *image = rect.grid[a]; if (image) image->setAlpha(mAlpha); @@ -205,7 +205,7 @@ void Tab::draw(gcn::Graphics *graphics) // draw tab if (openGLMode != 2) { - ImageRect &rect = skin->getBorder(); + const ImageRect &rect = skin->getBorder(); if (mRedraw || mode != mMode || static_cast(graphics)->getRedraw()) { -- cgit v1.2.3-70-g09d2