diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2001-04-13 19:07:40 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2001-04-13 19:07:40 +0000 |
| commit | b8a8c98f04c752e69c17f2709c7496489b839611 (patch) | |
| tree | 3eae855f2e104e207ecd36650ad9963a1c5f8ff4 /src/fl_draw_pixmap.cxx | |
| parent | bb86f132ebc530f9d06d441f7d13675efcef1322 (diff) | |
Eliminate all compiler warnings (string constants, const'ness, hiding of
class members, empty fl_call_main.c)
Update pixmap functions to accept const * const * or * const * pointers.
(confused? :)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1429 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/fl_draw_pixmap.cxx')
| -rw-r--r-- | src/fl_draw_pixmap.cxx | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/fl_draw_pixmap.cxx b/src/fl_draw_pixmap.cxx index b64b51821..eb8c92076 100644 --- a/src/fl_draw_pixmap.cxx +++ b/src/fl_draw_pixmap.cxx @@ -1,5 +1,5 @@ // -// "$Id: fl_draw_pixmap.cxx,v 1.4.2.7 2001/01/22 15:13:40 easysw Exp $" +// "$Id: fl_draw_pixmap.cxx,v 1.4.2.8 2001/04/13 19:07:40 easysw Exp $" // // Pixmap drawing code for the Fast Light Tool Kit (FLTK). // @@ -43,7 +43,11 @@ static int ncolors, chars_per_pixel; -int fl_measure_pixmap(/*const*/char * const *data, int &w, int &h) { +int fl_measure_pixmap(/*const*/ char* const* data, int &w, int &h) { + return fl_measure_pixmap((const char*const*)data,w,h); +} + +int fl_measure_pixmap(const char * const *data, int &w, int &h) { int i = sscanf(data[0],"%d %d %d %d",&w,&h,&ncolors,&chars_per_pixel); if (i<4 || w<=0 || h<=0 || chars_per_pixel!=1 && chars_per_pixel!=2) return w=0; @@ -134,7 +138,11 @@ extern int fl_parse_color(const char*, uchar&, uchar&, uchar&); uchar **fl_mask_bitmap; // if non-zero, create bitmap and store pointer here -int fl_draw_pixmap(/*const*/char*const* di, int x, int y, Fl_Color bg) { +int fl_draw_pixmap(/*const*/ char* const* data, int x,int y,Fl_Color bg) { + return fl_draw_pixmap((const char*const*)data,x,y,bg); +} + +int fl_draw_pixmap(const char*const* di, int x, int y, Fl_Color bg) { pixmap_data d; if (!fl_measure_pixmap(di, d.w, d.h)) return 0; const uchar*const* data = (const uchar*const*)(di+1); @@ -264,5 +272,5 @@ int fl_draw_pixmap(/*const*/char*const* di, int x, int y, Fl_Color bg) { } // -// End of "$Id: fl_draw_pixmap.cxx,v 1.4.2.7 2001/01/22 15:13:40 easysw Exp $". +// End of "$Id: fl_draw_pixmap.cxx,v 1.4.2.8 2001/04/13 19:07:40 easysw Exp $". // |
