]> Dogcows Code - chaz/openbox/commitdiff
added some consts to the cascade code
authorScott Moynes <smoynes@nexus.carleton.ca>
Mon, 15 Apr 2002 15:45:11 +0000 (15:45 +0000)
committerScott Moynes <smoynes@nexus.carleton.ca>
Mon, 15 Apr 2002 15:45:11 +0000 (15:45 +0000)
src/Workspace.cc
src/Workspace.h

index df8133deee7ad5d64c701e74da0168e1baef8cd7..7254205a26a2e01f1ba1929cf25f1f5f129b8c34 100644 (file)
@@ -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;
index 1091f8864e0d36b5ddf25023bc67c8842696d2f9..55962b6211d997a999dfabf9625437b349569575 100644 (file)
@@ -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);
This page took 0.024401 seconds and 4 git commands to generate.