diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-09-13 03:16:00 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-09-13 03:16:00 +0300 |
commit | 39dbb74b3f1adc7d28c1a8ba9bb633afbf745b6b (patch) | |
tree | 7b730913775d25984689d3308b0d561999662192 /src | |
parent | 262ce6d0ee2737e8d24914e4ed35c29cc335060b (diff) | |
download | manaverse-39dbb74b3f1adc7d28c1a8ba9bb633afbf745b6b.tar.gz manaverse-39dbb74b3f1adc7d28c1a8ba9bb633afbf745b6b.tar.bz2 manaverse-39dbb74b3f1adc7d28c1a8ba9bb633afbf745b6b.tar.xz manaverse-39dbb74b3f1adc7d28c1a8ba9bb633afbf745b6b.zip |
Fix code style.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/theme.cpp | 2 | ||||
-rw-r--r-- | src/gui/theme.h | 2 | ||||
-rw-r--r-- | src/gui/widgets/itemlinkhandler.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/scrollarea.cpp | 4 | ||||
-rw-r--r-- | src/gui/widgets/window.cpp | 4 | ||||
-rw-r--r-- | src/gui/widgets/window.h | 4 |
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 |