Skip to content

Commit

Permalink
Fix compiler warnings, also fixes #139
Browse files Browse the repository at this point in the history
Signed-off-by: raku-cat <raku@raku.party>
  • Loading branch information
raku-cat committed May 13, 2018
1 parent 7b60eea commit 991cdf8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/image.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ static inline unsigned char computeRGBPixel(unsigned char* data, XImage* image,
data[curpixel] = (unsigned char)((real & image->red_mask) >> roffset);
data[curpixel+1] = (unsigned char)((real & image->green_mask) >> goffset);
data[curpixel+2] = (unsigned char)((real & image->blue_mask) >> boffset);
return *data;
}

static inline unsigned char computeRGBAPixel(unsigned char* data, XImage* image, int x, int y, int roffset, int goffset, int boffset, int aoffset, int width, glm::ivec2 offset ) {
Expand All @@ -47,6 +48,7 @@ static inline unsigned char computeRGBAPixel(unsigned char* data, XImage* image,
data[curpixel+1] = (unsigned char)((real & image->green_mask) >> goffset);
data[curpixel+2] = (unsigned char)((real & image->blue_mask) >> boffset);
data[curpixel+3] = (unsigned char)(real >> aoffset);
return *data;
}

static inline unsigned char computeRGBAPixel(unsigned char* data, XImage* image, int x, int y, int roffset, int goffset, int boffset, int width, glm::ivec2 offset ) {
Expand All @@ -57,6 +59,7 @@ static inline unsigned char computeRGBAPixel(unsigned char* data, XImage* image,
data[curpixel+1] = (unsigned char)((real & image->green_mask) >> goffset);
data[curpixel+2] = (unsigned char)((real & image->blue_mask) >> boffset);
data[curpixel+3] = 255;
return *data;
}

static inline int get_shift (int mask) {
Expand Down

0 comments on commit 991cdf8

Please sign in to comment.