From adcdf317027530bcfbf757a23919d3a87107d816 Mon Sep 17 00:00:00 2001 From: Scott Moynes Date: Mon, 15 Apr 2002 15:45:11 +0000 Subject: [PATCH] added some consts to the cascade code --- src/Workspace.cc | 4 ++-- src/Workspace.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Workspace.cc b/src/Workspace.cc index df8133de..7254205a 100644 --- a/src/Workspace.cc +++ b/src/Workspace.cc @@ -584,7 +584,7 @@ void Workspace::placeWindow(OpenboxWindow *win) { } // switch if (! placed) { - Point *p = cascade(win); + const Point *const p = cascade(win); place_x=p->x(); place_y=p->y(); delete p; @@ -598,7 +598,7 @@ void Workspace::placeWindow(OpenboxWindow *win) { win->configure(place_x, place_y, win->size().w(), win->size().h()); } -Point *Workspace::cascade(const OpenboxWindow *const win){ +inline const Point *const Workspace::cascade(const OpenboxWindow *const win){ if (((unsigned) cascade_x > (screen.size().w() / 2)) || ((unsigned) cascade_y > (screen.size().h() / 2))) cascade_x = cascade_y = 32; diff --git a/src/Workspace.h b/src/Workspace.h index 1091f886..55962b62 100644 --- a/src/Workspace.h +++ b/src/Workspace.h @@ -49,7 +49,7 @@ protected: void placeWindow(OpenboxWindow *); Point *bestFitPlacement(const Size &win_size, const Rect &space); Point *rowSmartPlacement(const Size &win_size, const Rect &space); - Point *cascade(const OpenboxWindow* window); + const Point *const cascade(const OpenboxWindow* window); public: Workspace(BScreen &, int = 0); -- 2.45.2