diff options
| author | Greg Ercolano <erco@seriss.com> | 2016-07-19 20:12:21 +0000 |
|---|---|---|
| committer | Greg Ercolano <erco@seriss.com> | 2016-07-19 20:12:21 +0000 |
| commit | dc8a00fbba213c9ea8632c046230ecc677b996f9 (patch) | |
| tree | d6778e264b06159b27e3f6bd845431f400af7a6f /src/Fl_Text_Editor.cxx | |
| parent | 8850c5c822ce0878b4d808c46b25463136a69231 (diff) | |
Bringing over this fix from 1.3 current to the porting branch.
Fixes STR #3306; const version of bound_key_function().
Also affects patches in STR #3305, which will be applied in next commit.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11819 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Text_Editor.cxx')
| -rw-r--r-- | src/Fl_Text_Editor.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Fl_Text_Editor.cxx b/src/Fl_Text_Editor.cxx index 09435d2e3..b2ec38456 100644 --- a/src/Fl_Text_Editor.cxx +++ b/src/Fl_Text_Editor.cxx @@ -163,7 +163,14 @@ void Fl_Text_Editor::add_default_key_bindings(Key_Binding** list) { } /** Returns the function associated with a key binding.*/ -Fl_Text_Editor::Key_Func Fl_Text_Editor::bound_key_function(int key, int state, Key_Binding* list) { +#if FLTK_ABI_VERSION < 10304 +// OLD - non-const +Fl_Text_Editor::Key_Func Fl_Text_Editor::bound_key_function(int key, int state, Key_Binding* list) +#else +// NEW - const (STR#3306) +Fl_Text_Editor::Key_Func Fl_Text_Editor::bound_key_function(int key, int state, Key_Binding* list) const +#endif +{ Key_Binding* cur; for (cur = list; cur; cur = cur->next) if (cur->key == key) |
