Changed return type to 'void' of function with unused return value.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10111 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
27e67ac456
commit
4babd17d12
|
@ -30,7 +30,7 @@ typedef union {
|
|||
} ColorRGB32;
|
||||
|
||||
class Halftone;
|
||||
typedef int (Halftone::*PFN_dither)(uchar *dst, const uchar *src, int x, int y, int width);
|
||||
typedef void (Halftone::*PFN_dither)(uchar *dst, const uchar *src, int x, int y, int width);
|
||||
typedef uint (*PFN_gray)(ColorRGB32 c);
|
||||
|
||||
class Halftone {
|
||||
|
@ -59,7 +59,7 @@ public:
|
|||
~Halftone();
|
||||
void setPlanes(Planes planes);
|
||||
void setBlackValue(BlackValue blackValue);
|
||||
int dither(uchar *dst, const uchar *src, int x, int y, int width);
|
||||
void dither(uchar *dst, const uchar *src, int x, int y, int width);
|
||||
int getPixelDepth() const;
|
||||
const uchar *getPattern() const;
|
||||
void setPattern(const uchar *pattern);
|
||||
|
@ -74,13 +74,13 @@ protected:
|
|||
void initElements(int x, int y, uchar *elements);
|
||||
uint getDensity(ColorRGB32 c) const;
|
||||
uchar convertUsingBlackValue(uchar byte) const;
|
||||
int ditherRGB32(uchar *dst, const uchar *src, int x, int y, int width);
|
||||
void ditherRGB32(uchar *dst, const uchar *src, int x, int y, int width);
|
||||
|
||||
void initFloydSteinberg();
|
||||
void deleteErrorTables();
|
||||
void uninitFloydSteinberg();
|
||||
void setupErrorBuffer(int x, int y, int width);
|
||||
int ditherFloydSteinberg(uchar *dst, const uchar* src, int x, int y, int width);
|
||||
void ditherFloydSteinberg(uchar *dst, const uchar* src, int x, int y, int width);
|
||||
|
||||
Halftone(const Halftone &);
|
||||
Halftone &operator = (const Halftone &);
|
||||
|
|
|
@ -135,15 +135,13 @@ void Halftone::initElements(int x, int y, uchar *elements)
|
|||
}
|
||||
}
|
||||
|
||||
int Halftone::dither(
|
||||
void Halftone::dither(
|
||||
uchar *dst,
|
||||
const uchar *src,
|
||||
int x,
|
||||
int y,
|
||||
int width)
|
||||
{
|
||||
int result;
|
||||
|
||||
if (fPlanes == kPlaneRGB1) {
|
||||
switch (fCurrentPlane) {
|
||||
case 0:
|
||||
|
@ -160,14 +158,13 @@ int Halftone::dither(
|
|||
ASSERT(fGray == &gray);
|
||||
}
|
||||
|
||||
result = (this->*fDither)(dst, src, x, y, width);
|
||||
(this->*fDither)(dst, src, x, y, width);
|
||||
|
||||
// next plane
|
||||
fCurrentPlane ++;
|
||||
if (fCurrentPlane >= fNumberOfPlanes) {
|
||||
fCurrentPlane = 0;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
void Halftone::setGrayFunction(GrayFunction grayFunction)
|
||||
|
@ -186,7 +183,7 @@ void Halftone::setGrayFunction(GrayFunction grayFunction)
|
|||
setGrayFunction(function);
|
||||
}
|
||||
|
||||
int Halftone::ditherRGB32(
|
||||
void Halftone::ditherRGB32(
|
||||
uchar *dst,
|
||||
const uchar *a_src,
|
||||
int x,
|
||||
|
@ -249,8 +246,6 @@ int Halftone::ditherRGB32(
|
|||
}
|
||||
*dst++ = convertUsingBlackValue(cur);
|
||||
}
|
||||
|
||||
return widthByte;
|
||||
}
|
||||
|
||||
// Floyd-Steinberg dithering
|
||||
|
@ -288,7 +283,7 @@ void Halftone::setupErrorBuffer(int x, int y, int width)
|
|||
}
|
||||
}
|
||||
|
||||
int Halftone::ditherFloydSteinberg(uchar *dst, const uchar* a_src, int x, int y, int width)
|
||||
void Halftone::ditherFloydSteinberg(uchar *dst, const uchar* a_src, int x, int y, int width)
|
||||
{
|
||||
if (fErrorTables[fCurrentPlane] == NULL || fX != x || fCurrentPlane == 0 && fY != y - 1 || fCurrentPlane > 0 && fY != y || fWidth != width) {
|
||||
setupErrorBuffer(x, y, width);
|
||||
|
|
Loading…
Reference in New Issue