diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2010-10-28 18:02:20 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2010-10-28 18:02:20 +0000 |
| commit | 291faee430b13248a1b97e1ef254b9a468a67ad1 (patch) | |
| tree | ff6f7a61ff69000fe2b0c25b71d16bbc1ee2bb3a /src/Fl_Input.cxx | |
| parent | 58bdfbdedd56582d4ed835018494dc21dc605f40 (diff) | |
Fixed a bunch of warnings from gcc 4.4.5 . Most of these are parenthesis missing to make the precedence of && over || obvious. Ah well, why not...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7765 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Input.cxx')
| -rw-r--r-- | src/Fl_Input.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Fl_Input.cxx b/src/Fl_Input.cxx index b5ffb3f8f..0a7a05ea9 100644 --- a/src/Fl_Input.cxx +++ b/src/Fl_Input.cxx @@ -123,12 +123,12 @@ int Fl_Input::handle_key() { // find the insert position int ip = position()<mark() ? position() : mark(); // This is complex to allow "0xff12" hex to be typed: - if (!ip && (ascii == '+' || ascii == '-') + if ( (!ip && (ascii == '+' || ascii == '-')) || (ascii >= '0' && ascii <= '9') || (ip==1 && index(0)=='0' && (ascii=='x' || ascii == 'X')) - || (ip>1 && index(0)=='0' && (index(1)=='x'||index(1)=='X') - && (ascii>='A'&& ascii<='F' || ascii>='a'&& ascii<='f')) - || input_type()==FL_FLOAT_INPUT && ascii && strchr(legal_fp_chars, ascii)) + || (ip>1 && index(0)=='0' && (index(1)=='x'||index(1)=='X') + && ((ascii>='A'&& ascii<='F') || (ascii>='a'&& ascii<='f'))) + || (input_type()==FL_FLOAT_INPUT && ascii && strchr(legal_fp_chars, ascii))) { if (readonly()) fl_beep(); else replace(position(), mark(), &ascii, 1); @@ -532,8 +532,8 @@ int Fl_Input::handle(int event) { newpos = position(); position( oldpos, oldmark ); if (Fl::focus()==this && !Fl::event_state(FL_SHIFT) && input_type()!=FL_SECRET_INPUT && - (newpos >= mark() && newpos < position() || - newpos >= position() && newpos < mark())) { + ( (newpos >= mark() && newpos < position()) + || (newpos >= position() && newpos < mark())) ) { // user clicked in the selection, may be trying to drag drag_start = newpos; return 1; |
