From fc6d367f750bf380023c5096783c747cfad68e6b Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Wed, 16 Sep 2009 03:10:53 +0000 Subject: [PATCH] remove Clone() and EmptyClone() methods from NCurses::Window and derives these functions served no purpose. --- src/menu.h | 8 -------- src/scrollpad.cpp | 5 ----- src/scrollpad.h | 3 --- src/window.cpp | 5 ----- src/window.h | 3 --- 5 files changed, 24 deletions(-) diff --git a/src/menu.h b/src/menu.h index aabe9bf7..92fe5950 100644 --- a/src/menu.h +++ b/src/menu.h @@ -179,9 +179,6 @@ namespace NCurses const T &at(size_t i) const; const T &operator[](size_t i) const; T &operator[](size_t i); - - virtual Menu *Clone() const { return new Menu(*this); } - virtual Menu *EmptyClone() const; protected: void ClearFiltered(); @@ -797,10 +794,5 @@ template T &NCurses::Menu::operator[](size_t i) return (*itsOptionsPtr)[i]->Item; } -template NCurses::Menu *NCurses::Menu::EmptyClone() const -{ - return new NCurses::Menu(GetStartX(), GetStartY(), GetWidth(), GetHeight(), itsTitle, itsBaseColor, itsBorder); -} - #endif diff --git a/src/scrollpad.cpp b/src/scrollpad.cpp index 96d0dcfd..cdb7cb25 100644 --- a/src/scrollpad.cpp +++ b/src/scrollpad.cpp @@ -215,8 +215,3 @@ Scrollpad &Scrollpad::operator<<(const std::string &s) } #endif // _UTF8 -Scrollpad *Scrollpad::EmptyClone() const -{ - return new Scrollpad(GetStartX(), GetStartY(), GetWidth(), GetHeight(), itsTitle, itsBaseColor, itsBorder); -} - diff --git a/src/scrollpad.h b/src/scrollpad.h index 4a417162..654f47fc 100644 --- a/src/scrollpad.h +++ b/src/scrollpad.h @@ -58,9 +58,6 @@ namespace NCurses Scrollpad &operator<<(const std::string &s); # endif // _UTF8 - virtual Scrollpad *Clone() const { return new Scrollpad(*this); } - virtual Scrollpad *EmptyClone() const; - protected: virtual void Recreate(); diff --git a/src/window.cpp b/src/window.cpp index 413d1c2e..14a11011 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -827,11 +827,6 @@ Window &Window::operator<<(size_t s) return *this; } -Window * Window::EmptyClone() const -{ - return new Window(GetStartX(), GetStartY(), GetWidth(), GetHeight(), itsTitle, itsBaseColor, itsBorder); -} - std::string ToString(const std::wstring &ws) { std::string result; diff --git a/src/window.h b/src/window.h index cbaabfe9..44402bbb 100644 --- a/src/window.h +++ b/src/window.h @@ -434,9 +434,6 @@ namespace NCurses /// Window &operator<<(const std::wstring &ws); - virtual Window *Clone() const { return new Window(*this); } - virtual Window *EmptyClone() const; - /// Fallback for Length() for wide strings used if unicode support is disabled /// @param s string that real length has to be measured /// @return standard std::string::length() result since it's only fallback