From 701250efb57ef94e35d2b7b6f0d6d045b713e6f5 Mon Sep 17 00:00:00 2001 From: RichieSams Date: Sun, 22 Sep 2013 15:53:15 -0500 Subject: GRAPHICS: Remove variable shadowing --- graphics/surface.cpp | 6 +++--- graphics/surface.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'graphics') diff --git a/graphics/surface.cpp b/graphics/surface.cpp index a8173f0e9c..777c1058fb 100644 --- a/graphics/surface.cpp +++ b/graphics/surface.cpp @@ -133,7 +133,7 @@ const Surface Surface::getSubArea(const Common::Rect &area) const { return subSurface; } -void Surface::copyRectToSurface(const void *buffer, int pitch, int destX, int destY, int width, int height) { +void Surface::copyRectToSurface(const void *buffer, int srcPitch, int destX, int destY, int width, int height) { assert(buffer); assert(destX >= 0 && destX < w); @@ -146,8 +146,8 @@ void Surface::copyRectToSurface(const void *buffer, int pitch, int destX, int de byte *dst = (byte *)getBasePtr(destX, destY); for (int i = 0; i < height; i++) { memcpy(dst, src, width * format.bytesPerPixel); - src += pitch; - dst += this->pitch; + src += srcPitch; + dst += pitch; } } diff --git a/graphics/surface.h b/graphics/surface.h index 1492e71e68..07e289b0bb 100644 --- a/graphics/surface.h +++ b/graphics/surface.h @@ -219,7 +219,7 @@ public: * @param width The width of the destination rectangle * @param height The height of the destination rectangle */ - void copyRectToSurface(const void *buffer, int pitch, int destX, int destY, int width, int height); + void copyRectToSurface(const void *buffer, int srcPitch, int destX, int destY, int width, int height); /** * Copies a bitmap to the Surface internal buffer. The pixel format * of buffer must match the pixel format of the Surface. -- cgit v1.2.3