diff options
| author | Lauri Kasanen <cand@gmx.com> | 2014-08-23 09:27:30 +0000 |
|---|---|---|
| committer | Lauri Kasanen <cand@gmx.com> | 2014-08-23 09:27:30 +0000 |
| commit | 3b1e7f31b9f89b793e73f6408cdd8fc178bcf2e3 (patch) | |
| tree | 9321087c2c6e535fce12dfe86a7bb40d6637ef4c /src/fl_boxtype.cxx | |
| parent | b42e32f70dae18ebfd4acd59ccd9ef298cd5ad04 (diff) | |
Const the gray ramps
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10253 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/fl_boxtype.cxx')
| -rw-r--r-- | src/fl_boxtype.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/fl_boxtype.cxx b/src/fl_boxtype.cxx index ff34251c7..671e24f7d 100644 --- a/src/fl_boxtype.cxx +++ b/src/fl_boxtype.cxx @@ -32,14 +32,14 @@ //////////////////////////////////////////////////////////////// -static uchar active_ramp[24] = { +static const uchar active_ramp[24] = { FL_GRAY_RAMP+0, FL_GRAY_RAMP+1, FL_GRAY_RAMP+2, FL_GRAY_RAMP+3, FL_GRAY_RAMP+4, FL_GRAY_RAMP+5, FL_GRAY_RAMP+6, FL_GRAY_RAMP+7, FL_GRAY_RAMP+8, FL_GRAY_RAMP+9, FL_GRAY_RAMP+10,FL_GRAY_RAMP+11, FL_GRAY_RAMP+12,FL_GRAY_RAMP+13,FL_GRAY_RAMP+14,FL_GRAY_RAMP+15, FL_GRAY_RAMP+16,FL_GRAY_RAMP+17,FL_GRAY_RAMP+18,FL_GRAY_RAMP+19, FL_GRAY_RAMP+20,FL_GRAY_RAMP+21,FL_GRAY_RAMP+22,FL_GRAY_RAMP+23}; -static uchar inactive_ramp[24] = { +static const uchar inactive_ramp[24] = { 43, 43, 44, 44, 44, 45, 45, 46, 46, 46, 47, 47, @@ -54,7 +54,7 @@ static int draw_it_active = 1; */ int Fl::draw_box_active() { return draw_it_active; } -uchar *fl_gray_ramp() {return (draw_it_active?active_ramp:inactive_ramp)-'A';} +const uchar *fl_gray_ramp() {return (draw_it_active?active_ramp:inactive_ramp)-'A';} /** Draws a series of line segments around the given box. @@ -69,7 +69,7 @@ uchar *fl_gray_ramp() {return (draw_it_active?active_ramp:inactive_ramp)-'A';} \param[in] x, y, w, h position and size */ void fl_frame(const char* s, int x, int y, int w, int h) { - uchar *g = fl_gray_ramp(); + const uchar *g = fl_gray_ramp(); if (h > 0 && w > 0) for (;*s;) { // draw top line: fl_color(g[(int)*s++]); @@ -103,7 +103,7 @@ void fl_frame(const char* s, int x, int y, int w, int h) { \param[in] x, y, w, h position and size */ void fl_frame2(const char* s, int x, int y, int w, int h) { - uchar *g = fl_gray_ramp(); + const uchar *g = fl_gray_ramp(); if (h > 0 && w > 0) for (;*s;) { // draw bottom line: fl_color(g[(int)*s++]); |
