From d60eec2c2cd453ecbaee7883a272479792875465 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 26 Apr 2013 20:08:06 +0300 Subject: fix code style more. --- src/gui/widgets/tabbedarea.cpp | 2 +- src/gui/widgets/window.cpp | 4 ++-- src/gui/widgets/window.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/gui') diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp index 75be5bf6f..21e615252 100644 --- a/src/gui/widgets/tabbedarea.cpp +++ b/src/gui/widgets/tabbedarea.cpp @@ -381,7 +381,7 @@ void TabbedArea::widgetResized(const gcn::Event &event A_UNUSED) { if (mFollowDownScroll && height != 0) { - const gcn::Rectangle rect = w->getDimension(); + const gcn::Rectangle &rect = w->getDimension(); if (rect.height != 0 && rect.height > height + 2) { if (scr->getVerticalScrollAmount() diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp index 053c60875..0619a85a9 100644 --- a/src/gui/widgets/window.cpp +++ b/src/gui/widgets/window.cpp @@ -360,7 +360,7 @@ void Window::setLocationHorisontallyRelativeTo(const gcn::Widget *const widget) - mDimension.width) / 2 - x), 0); } -void Window::setLocationRelativeTo(const ImageRect::ImagePosition position, +void Window::setLocationRelativeTo(const ImageRect::ImagePosition &position, int offsetX, int offsetY) { if (position == ImageRect::UPPER_LEFT) @@ -940,7 +940,7 @@ void Window::setDefaultSize() } void Window::setDefaultSize(int defaultWidth, int defaultHeight, - const ImageRect::ImagePosition position, + const ImageRect::ImagePosition &position, const int offsetX, const int offsetY) { int x = 0, y = 0; diff --git a/src/gui/widgets/window.h b/src/gui/widgets/window.h index bf9bd935f..45a70dbeb 100644 --- a/src/gui/widgets/window.h +++ b/src/gui/widgets/window.h @@ -101,7 +101,7 @@ class Window : public gcn::Window, /** * Sets the location relative to the given enumerated position. */ - void setLocationRelativeTo(const ImageRect::ImagePosition position, + void setLocationRelativeTo(const ImageRect::ImagePosition &position, int offsetX = 0, int offsetY = 0); /** @@ -329,7 +329,7 @@ class Window : public gcn::Window, * on a relative enumerated position, rather than a coordinate position. */ void setDefaultSize(int defaultWidth, int defaultHeight, - const ImageRect::ImagePosition position, + const ImageRect::ImagePosition &position, const int offsetx = 0, const int offsetY = 0); /** -- cgit v1.2.3-70-g09d2