diff options
| author | Ian MacArthur <imacarthur@gmail.com> | 2014-05-02 09:13:29 +0000 |
|---|---|---|
| committer | Ian MacArthur <imacarthur@gmail.com> | 2014-05-02 09:13:29 +0000 |
| commit | 315fcfa57abd7564f7defc9f778175d90bb14a7f (patch) | |
| tree | 27f5a160f359684320fa2f39e06bf8f3076322d1 | |
| parent | b6049a3ef4b1fbddb4966e479db9eccdb0e81464 (diff) | |
Remove use of the macro min() from fl_gleam code, since it triggers redefinition warnings on some build hosts.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10143 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | src/fl_gleam.cxx | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/fl_gleam.cxx b/src/fl_gleam.cxx index 6b410fd55..02ff55ca4 100644 --- a/src/fl_gleam.cxx +++ b/src/fl_gleam.cxx @@ -27,11 +27,7 @@ #include <FL/Fl.H> #include <FL/fl_draw.H> -//#include <iostream> -//using namespace std; - -#define min(A,B) ((A) < (B) ? (A) : (B)) static void gleam_color(Fl_Color c) { if (Fl::draw_box_active()) fl_color(c); @@ -40,8 +36,8 @@ static void gleam_color(Fl_Color c) { static void shade_rect_top_bottom(int x, int y, int w, int h, Fl_Color fg1, Fl_Color fg2, float th) { // Draws the shiny using maximum limits - int h_top = min(h/2,20); - int h_bottom = min(h/6,15); + int h_top = ((h/2) < (20) ? (h/2) : (20)); // min(h/2,20); + int h_bottom = ((h/6) < (15) ? (h/6) : (15)); // min(h/6,15); int h_flat = h-(h_top+h_bottom); int j = 0; float step_size_top = h_top>1?(0.999/(float)(h_top)):1; |
