Merge pull request #568 from Mailaender/patch-1

Fix several gcc compiler warnings
This commit is contained in:
David Capello 2015-01-03 11:06:47 -03:00
commit 71cdfe24c3
4 changed files with 5 additions and 2 deletions

View File

@ -86,7 +86,7 @@ Color Color::fromIndex(int index)
// static
Color Color::fromImage(PixelFormat pixelFormat, color_t c)
{
Color color = Color::fromMask();
Color color = app::Color::fromMask();
switch (pixelFormat) {
@ -124,7 +124,7 @@ Color Color::fromImageGetPixel(Image *image, int x, int y)
// static
Color Color::fromString(const std::string& str)
{
Color color = Color::fromMask();
Color color = app::Color::fromMask();
if (str != "mask") {
if (str.find("rgb{") == 0 ||

View File

@ -93,6 +93,7 @@ template<typename ImageTraits>
static inline bool color_equal(color_t c1, color_t c2, int tolerance)
{
static_assert(false && sizeof(ImageTraits), "Invalid color comparison");
return false;
}
template<>

View File

@ -39,6 +39,7 @@ namespace {
template<typename ImageTraits, int color_depth>
int convert_color_to_allegro(color_t color, const Palette* palette) {
static_assert(false && sizeof(ImageTraits), "Invalid color conversion");
return 0;
}
template<>

View File

@ -42,6 +42,7 @@ namespace {
template<typename ImageTraits, she::SurfaceFormat format>
uint32_t convert_color_to_surface(color_t color, const Palette* palette, const she::SurfaceFormatData* fd) {
static_assert(false && sizeof(ImageTraits), "Invalid color conversion");
return 0;
}
template<>