summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGreg Ercolano <erco@seriss.com>2014-01-21 03:59:45 +0000
committerGreg Ercolano <erco@seriss.com>2014-01-21 03:59:45 +0000
commit9ba8793018114e7625ba27bfb25486a66b020977 (patch)
treebd329b5c8769c335e792806388ad94abe8fbd0dd /src
parentabdc83470530c5fa8e15370a2032093cd91dace7 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Tree.cxx11
1 files changed, 11 insertions, 0 deletions
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<Fl_Tree_Item*>(
+ static_cast<const Fl_Tree&>(*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<Fl_Tree_Item*>(
+ static_cast<const Fl_Tree&>(*this).find_clicked()));
+}
#endif
/// Set the item that was last clicked.