From 452a410a3ea02f58930c4b3cc5a04bbb6b3e7070 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Sat, 2 Feb 2019 17:47:55 +0100 Subject: STR #2714: remove new shadow lint for MacOS --- src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx | 10 +++++----- src/drivers/PostScript/Fl_PostScript.cxx | 10 +++++----- src/drivers/Quartz/Fl_Quartz_Graphics_Driver_font.cxx | 4 ++-- src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx | 4 ++-- .../Quartz/Fl_Quartz_Graphics_Driver_line_style.cxx | 16 ++++++++-------- 5 files changed, 22 insertions(+), 22 deletions(-) (limited to 'src/drivers') diff --git a/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx b/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx index 1f189300c..8fd33743d 100644 --- a/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx +++ b/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx @@ -106,13 +106,13 @@ void Fl_Cocoa_Window_Driver::destroy_double_buffer() void Fl_Cocoa_Window_Driver::draw_begin() { if (!Fl_Surface_Device::surface()->driver()->has_feature(Fl_Graphics_Driver::NATIVE)) return; - CGContextRef gc = (CGContextRef)Fl_Surface_Device::surface()->driver()->gc(); + CGContextRef my_gc = (CGContextRef)Fl_Surface_Device::surface()->driver()->gc(); if (shape_data_) { # if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 if (shape_data_->mask && (&CGContextClipToMask != NULL)) { - CGContextClipToMask(gc, CGRectMake(0,0,w(),h()), shape_data_->mask); // requires Mac OS 10.4 + CGContextClipToMask(my_gc, CGRectMake(0,0,w(),h()), shape_data_->mask); // requires Mac OS 10.4 } - CGContextSaveGState(gc); + CGContextSaveGState(my_gc); # endif } } @@ -143,8 +143,8 @@ void Fl_Cocoa_Window_Driver::draw_end() } # if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 if (Fl_Surface_Device::surface()->driver()->has_feature(Fl_Graphics_Driver::NATIVE)) { - CGContextRef gc = (CGContextRef)Fl_Surface_Device::surface()->driver()->gc(); - if (shape_data_) CGContextRestoreGState(gc); + CGContextRef my_gc = (CGContextRef)Fl_Surface_Device::surface()->driver()->gc(); + if (shape_data_) CGContextRestoreGState(my_gc); } # endif } diff --git a/src/drivers/PostScript/Fl_PostScript.cxx b/src/drivers/PostScript/Fl_PostScript.cxx index e62946392..4d74f0840 100644 --- a/src/drivers/PostScript/Fl_PostScript.cxx +++ b/src/drivers/PostScript/Fl_PostScript.cxx @@ -974,9 +974,9 @@ void Fl_PostScript_Graphics_Driver::color(unsigned char r, unsigned char g, unsi } } -void Fl_PostScript_Graphics_Driver::draw(int angle, const char *str, int n, int x, int y) +void Fl_PostScript_Graphics_Driver::draw(int rotation, const char *str, int n, int x, int y) { - fprintf(output, "GS %d %d translate %d rotate\n", x, y, - angle); + fprintf(output, "GS %d %d translate %d rotate\n", x, y, -rotation); this->transformed_draw(str, n, 0, 0); fprintf(output, "GR\n"); } @@ -1046,7 +1046,7 @@ void Fl_PostScript_Graphics_Driver::transformed_draw_extra(const char* str, int font(fontnum, old_size); fl_delete_offscreen(off); // compute the mask of what is not the background - uchar *mask = calc_mask(img, w2, h, bg_color); + uchar *img_mask = calc_mask(img, w2, h, bg_color); delete[] img; // write the string image to PostScript as a scaled bitmask scale = w2 / float(w); @@ -1055,14 +1055,14 @@ void Fl_PostScript_Graphics_Driver::transformed_draw_extra(const char* str, int int wmask = (w2+7)/8; void *rle85 = prepare_rle85(); for (int j = h - 1; j >= 0; j--){ - di = mask + j * wmask; + di = img_mask + j * wmask; for (int i = 0; i < wmask; i++){ write_rle85(*di, rle85); di++; } } close_rle85(rle85); fputc('\n', output); - delete[] mask; + delete[] img_mask; } static int is_in_table(unsigned utf) { diff --git a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_font.cxx b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_font.cxx index 7e1717650..9c4acee95 100644 --- a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_font.cxx +++ b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_font.cxx @@ -152,8 +152,8 @@ const char* Fl_Quartz_Graphics_Driver::get_font_name(Fl_Font fnum, int* ap) { Fl_Fontdesc *f = fl_fonts + fnum; if (!f->fontname[0]) { this->set_fontname_in_fontdesc(f); - const char* p = f->name; - if (!p || !*p) {if (ap) *ap = 0; return "";} + const char* thisFont = f->name; + if (!thisFont || !*thisFont) {if (ap) *ap = 0; return "";} int type = 0; if (strstr(f->name, "Bold")) type |= FL_BOLD; if (strstr(f->name, "Italic") || strstr(f->name, "Oblique")) type |= FL_ITALIC; diff --git a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx index 2427c2084..bb4240864 100644 --- a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx +++ b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx @@ -310,8 +310,8 @@ void Fl_Quartz_Graphics_Driver::draw_CGImage(CGImageRef cgimg, int x, int y, int CGContextRestoreGState(gc_); } -void Fl_Quartz_Graphics_Driver::uncache_pixmap(fl_uintptr_t p) { - CGImageRelease((CGImageRef)p); +void Fl_Quartz_Graphics_Driver::uncache_pixmap(fl_uintptr_t pixmap_ref) { + CGImageRelease((CGImageRef)pixmap_ref); } // diff --git a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_line_style.cxx b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_line_style.cxx index 88071d8df..1945ea55d 100644 --- a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_line_style.cxx +++ b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_line_style.cxx @@ -56,8 +56,8 @@ void Fl_Quartz_Graphics_Driver::line_style(int style, int width, char* dashes) { char *d = dashes; static CGFloat pattern[16]; if (d && *d) { - CGFloat *p = pattern; - while (*d) { *p++ = (float)*d++; } + CGFloat *pDst = pattern; + while (*d) { *pDst++ = (float)*d++; } quartz_line_pattern = pattern; quartz_line_pattern_size = d-dashes; } else if (style & 0xff) { @@ -71,14 +71,14 @@ void Fl_Quartz_Graphics_Driver::line_style(int style, int width, char* dashes) { dash = char(3*width); dot = gap = char(width); } - CGFloat *p = pattern; + CGFloat *pDst = pattern; switch (style & 0xff) { - case FL_DASH: *p++ = dash; *p++ = gap; break; - case FL_DOT: *p++ = dot; *p++ = gap; break; - case FL_DASHDOT: *p++ = dash; *p++ = gap; *p++ = dot; *p++ = gap; break; - case FL_DASHDOTDOT: *p++ = dash; *p++ = gap; *p++ = dot; *p++ = gap; *p++ = dot; *p++ = gap; break; + case FL_DASH: *pDst++ = dash; *pDst++ = gap; break; + case FL_DOT: *pDst++ = dot; *pDst++ = gap; break; + case FL_DASHDOT: *pDst++ = dash; *pDst++ = gap; *pDst++ = dot; *pDst++ = gap; break; + case FL_DASHDOTDOT: *pDst++ = dash; *pDst++ = gap; *pDst++ = dot; *pDst++ = gap; *pDst++ = dot; *pDst++ = gap; break; } - quartz_line_pattern_size = p-pattern; + quartz_line_pattern_size = pDst-pattern; quartz_line_pattern = pattern; } else { quartz_line_pattern = 0; -- cgit v1.2.3