Added 'const' attribute on non-modified arguments for color handling functions

These functions have both an input and an output color, marked the
input color as const to help distinguish.
This commit is contained in:
Christophe CURIS authored and Carlos R. Mafra committed 2013-05-02 20:48:45 +01:00
1 parent 8f7d4b7751
commit 0bf6297a32
3 files changed
+6 -6

No files matched your search

+2 -2
View File
@@ -37,7 +37,7 @@
#define MIN3(a,b,c) MIN(MIN(a,b), c)
#define MAX3(a,b,c) MAX(MAX(a,b), c)
void RHSVtoRGB(RHSVColor * hsv, RColor * rgb)
void RHSVtoRGB(const RHSVColor * hsv, RColor * rgb)
{
int h = hsv->hue % 360;
int s = hsv->saturation;
@@ -89,7 +89,7 @@ void RHSVtoRGB(RHSVColor * hsv, RColor * rgb)
}
}
void RRGBtoHSV(RColor * rgb, RHSVColor * hsv)
void RRGBtoHSV(const RColor * rgb, RHSVColor * hsv)
{
int h, s, v;
int max = MAX3(rgb->red, rgb->green, rgb->blue);