diff --git a/headers/os/interface/Window.h b/headers/os/interface/Window.h index cc03c338dd..ff4ad7fedb 100644 --- a/headers/os/interface/Window.h +++ b/headers/os/interface/Window.h @@ -168,8 +168,7 @@ public: void ResizeBy(float dx, float dy); void ResizeTo(float width, float height); - void CenterIn(BRect* rect); - void CenterIn(BRect rect); + void CenterIn(const BRect& rect); void CenterOnScreen(); virtual void Show(); diff --git a/src/kits/interface/Window.cpp b/src/kits/interface/Window.cpp index 7e7cf7f751..b646c37cbd 100644 --- a/src/kits/interface/Window.cpp +++ b/src/kits/interface/Window.cpp @@ -2458,7 +2458,7 @@ BWindow::ResizeTo(float width, float height) void -BWindow::CenterIn(BRect rect) +BWindow::CenterIn(const BRect& rect) { // Force layout resizing if needed if (GetLayout() != NULL) { @@ -2472,13 +2472,6 @@ BWindow::CenterIn(BRect rect) } -void -BWindow::CenterIn(BRect* rect) -{ - CenterIn(*rect); -} - - void BWindow::CenterOnScreen() {