Minor change in get_neighboring_pixels()

This commit is contained in:
David Capello 2015-12-04 17:46:50 -03:00
parent 5dc149d308
commit 6ab858b722

View File

@ -28,8 +28,6 @@ namespace filters {
TiledMode tiledMode, TiledMode tiledMode,
Delegate& delegate) Delegate& delegate)
{ {
int dx, dy;
// Y position to get pixel. // Y position to get pixel.
int getx, gety = y - centerY; int getx, gety = y - centerY;
int addx, addy = 0; int addx, addy = 0;
@ -48,7 +46,7 @@ namespace filters {
gety = sourceImage->height()-1; gety = sourceImage->height()-1;
} }
for (dy=0; dy<height; ++dy) { for (int dy=0; dy<height; ++dy) {
// X position to get pixel. // X position to get pixel.
getx = x - centerX; getx = x - centerX;
addx = 0; addx = 0;
@ -70,7 +68,7 @@ namespace filters {
typename Traits::const_address_t srcAddress = typename Traits::const_address_t srcAddress =
reinterpret_cast<typename Traits::const_address_t>(sourceImage->getPixelAddress(getx, gety)); reinterpret_cast<typename Traits::const_address_t>(sourceImage->getPixelAddress(getx, gety));
for (dx=0; dx<width; dx++) { for (int dx=0; dx<width; dx++) {
// Call the delegate for each pixel value. // Call the delegate for each pixel value.
delegate(*srcAddress); delegate(*srcAddress);