From 9ba8793018114e7625ba27bfb25486a66b020977 Mon Sep 17 00:00:00 2001 From: Greg Ercolano Date: Tue, 21 Jan 2014 03:59:45 +0000 Subject: Added missing non-const versions of find_clicked() git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10072 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Tree.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src') diff --git a/src/Fl_Tree.cxx b/src/Fl_Tree.cxx index 23d4a3c75..f701117b6 100644 --- a/src/Fl_Tree.cxx +++ b/src/Fl_Tree.cxx @@ -1120,6 +1120,12 @@ const Fl_Tree_Item* Fl_Tree::find_clicked(int yonly) const { if ( ! _root ) return(NULL); return(_root->find_clicked(_prefs, yonly)); } + +Fl_Tree_Item *Fl_Tree::find_clicked(int yonly) { + // "Effective C++, 3rd Ed", p.23. Sola fide, Amen. + return(const_cast( + static_cast(*this).find_clicked(yonly))); +} #else /// Find the item that was last clicked on. /// You should use callback_item() instead, which is fast, @@ -1138,6 +1144,11 @@ const Fl_Tree_Item* Fl_Tree::find_clicked() const { if ( ! _root ) return(NULL); return(_root->find_clicked(_prefs)); } +Fl_Tree_Item *Fl_Tree::find_clicked() { + // "Effective C++, 3rd Ed", p.23. Sola fide, Amen. + return(const_cast( + static_cast(*this).find_clicked())); +} #endif /// Set the item that was last clicked. -- cgit v1.2.3