summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/theme.cpp2
-rw-r--r--src/gui/theme.h2
-rw-r--r--src/gui/widgets/itemlinkhandler.cpp2
-rw-r--r--src/gui/widgets/scrollarea.cpp4
-rw-r--r--src/gui/widgets/window.cpp4
-rw-r--r--src/gui/widgets/window.h4
6 files changed, 9 insertions, 9 deletions
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp
index fe1591de2..738b62672 100644
--- a/src/gui/theme.cpp
+++ b/src/gui/theme.cpp
@@ -124,7 +124,7 @@ Skin::~Skin()
mOptions = nullptr;
}
-void Skin::updateAlpha(float minimumOpacityAllowed)
+void Skin::updateAlpha(const float minimumOpacityAllowed)
{
const float alpha = static_cast<float>(
std::max(static_cast<double>(minimumOpacityAllowed),
diff --git a/src/gui/theme.h b/src/gui/theme.h
index 245289096..1800addc8 100644
--- a/src/gui/theme.h
+++ b/src/gui/theme.h
@@ -94,7 +94,7 @@ class Skin
/**
* Updates the alpha value of the skin
*/
- void updateAlpha(float minimumOpacityAllowed = 0.0f);
+ void updateAlpha(const float minimumOpacityAllowed = 0.0f);
int getPadding() const
{ return mPadding; }
diff --git a/src/gui/widgets/itemlinkhandler.cpp b/src/gui/widgets/itemlinkhandler.cpp
index 3a4bf165b..293eb5237 100644
--- a/src/gui/widgets/itemlinkhandler.cpp
+++ b/src/gui/widgets/itemlinkhandler.cpp
@@ -95,7 +95,7 @@ void ItemLinkHandler::handleLink(const std::string &link,
std::string url = link;
replaceAll(url, " ", "");
listener.url = url;
- ConfirmDialog *confirmDlg = new ConfirmDialog(
+ ConfirmDialog *const confirmDlg = new ConfirmDialog(
_("Open url"), url, false, true);
confirmDlg->addActionListener(&listener);
}
diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp
index bc0375601..9d8be9717 100644
--- a/src/gui/widgets/scrollarea.cpp
+++ b/src/gui/widgets/scrollarea.cpp
@@ -394,7 +394,7 @@ void ScrollArea::drawRightButton(gcn::Graphics *const graphics)
void ScrollArea::drawVBar(gcn::Graphics *const graphics)
{
const gcn::Rectangle dim = getVerticalBarDimension();
- Graphics *g = static_cast<Graphics*>(graphics);
+ Graphics *const g = static_cast<Graphics*>(graphics);
if (vBackground.grid[4])
{
@@ -417,7 +417,7 @@ void ScrollArea::drawVBar(gcn::Graphics *const graphics)
void ScrollArea::drawHBar(gcn::Graphics *const graphics)
{
const gcn::Rectangle dim = getHorizontalBarDimension();
- Graphics *g = static_cast<Graphics*>(graphics);
+ Graphics *const g = static_cast<Graphics*>(graphics);
if (hBackground.grid[4])
{
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp
index e49af5f15..39e09ef4a 100644
--- a/src/gui/widgets/window.cpp
+++ b/src/gui/widgets/window.cpp
@@ -42,6 +42,8 @@
#include "debug.h"
+const int resizeMask = 8 + 4 + 2 + 1;
+
int Window::instances = 0;
int Window::mouseResize = 0;
@@ -923,7 +925,7 @@ int Window::getResizeHandles(const gcn::MouseEvent &event)
return resizeHandles;
}
-bool Window::isResizeAllowed(const gcn::MouseEvent &event)
+bool Window::isResizeAllowed(const gcn::MouseEvent &event) const
{
const int y = event.getY();
diff --git a/src/gui/widgets/window.h b/src/gui/widgets/window.h
index 01519e271..1e1caa6cd 100644
--- a/src/gui/widgets/window.h
+++ b/src/gui/widgets/window.h
@@ -396,7 +396,7 @@ class Window : public gcn::Window, private gcn::WidgetListener
gcn::Rectangle getWindowArea() const;
- bool isResizeAllowed(const gcn::MouseEvent &event);
+ bool isResizeAllowed(const gcn::MouseEvent &event) const;
void setCaptionFont(gcn::Font *font)
{ mCaptionFont = font; }
@@ -426,8 +426,6 @@ class Window : public gcn::Window, private gcn::WidgetListener
CLOSE = 0x10
};
- const int resizeMask = 8 + 4 + 2 + 1;
-
/**
* Ensures the window is on the screen, moving it if necessary. This is
* used by loadWindowState and setVisible(true), and when the screen