From 4fea35e3aa96661f35139b9e26e9139bf924ded7 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 17 Dec 2013 20:09:54 +0300 Subject: add restrict into layout. --- src/gui/widgets/layout.cpp | 7 ++++--- src/gui/widgets/layout.h | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/gui/widgets/layout.cpp b/src/gui/widgets/layout.cpp index 2e4f7c5b3..8d42d07ff 100644 --- a/src/gui/widgets/layout.cpp +++ b/src/gui/widgets/layout.cpp @@ -232,8 +232,9 @@ LayoutCell &LayoutArray::place(gcn::Widget *const widget, const int x, return cell; } -void LayoutArray::align(int &pos, int &size, const int dim, - LayoutCell const &cell, const int *const sizes, +void LayoutArray::align(int &restrict pos, int &restrict size, const int dim, + LayoutCell const &restrict cell, + const int *restrict const sizes, const int sizeCount) const { if (dim < 0 || dim >= 2) @@ -385,7 +386,7 @@ Layout::Layout() : setPadding(6); } -void Layout::reflow(int &nw, int &nh) +void Layout::reflow(int &restrict nw, int &restrict nh) { if (!mComputed) { diff --git a/src/gui/widgets/layout.h b/src/gui/widgets/layout.h index 4830279bd..7888b0759 100644 --- a/src/gui/widgets/layout.h +++ b/src/gui/widgets/layout.h @@ -128,8 +128,9 @@ class LayoutArray final /** * Gets the position and size of a widget along a given axis */ - void align(int &pos, int &size, const int dim, LayoutCell const &cell, - const int *const sizes, const int sizeCount) const; + void align(int &restrict pos, int &restrict size, const int dim, + LayoutCell const &restrict cell, + const int *restrict const sizes, const int sizeCount) const; /** * Ensures the private vectors are large enough. @@ -347,7 +348,7 @@ class Layout final : public LayoutCell * Sets the positions of all the widgets. * @see LayoutArray::reflow */ - void reflow(int &nW, int &nH); + void reflow(int &restrict nW, int &restrict nH); /** * When the minimum size of the layout is less than the available size, -- cgit v1.2.3-60-g2f50