summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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.