mirror of
https://github.com/aseprite/aseprite.git
synced 2025-04-01 19:20:17 +00:00
Merge pull request #568 from Mailaender/patch-1
Fix several gcc compiler warnings
This commit is contained in:
commit
71cdfe24c3
@ -86,7 +86,7 @@ Color Color::fromIndex(int index)
|
|||||||
// static
|
// static
|
||||||
Color Color::fromImage(PixelFormat pixelFormat, color_t c)
|
Color Color::fromImage(PixelFormat pixelFormat, color_t c)
|
||||||
{
|
{
|
||||||
Color color = Color::fromMask();
|
Color color = app::Color::fromMask();
|
||||||
|
|
||||||
switch (pixelFormat) {
|
switch (pixelFormat) {
|
||||||
|
|
||||||
@ -124,7 +124,7 @@ Color Color::fromImageGetPixel(Image *image, int x, int y)
|
|||||||
// static
|
// static
|
||||||
Color Color::fromString(const std::string& str)
|
Color Color::fromString(const std::string& str)
|
||||||
{
|
{
|
||||||
Color color = Color::fromMask();
|
Color color = app::Color::fromMask();
|
||||||
|
|
||||||
if (str != "mask") {
|
if (str != "mask") {
|
||||||
if (str.find("rgb{") == 0 ||
|
if (str.find("rgb{") == 0 ||
|
||||||
|
@ -93,6 +93,7 @@ template<typename ImageTraits>
|
|||||||
static inline bool color_equal(color_t c1, color_t c2, int tolerance)
|
static inline bool color_equal(color_t c1, color_t c2, int tolerance)
|
||||||
{
|
{
|
||||||
static_assert(false && sizeof(ImageTraits), "Invalid color comparison");
|
static_assert(false && sizeof(ImageTraits), "Invalid color comparison");
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
|
@ -39,6 +39,7 @@ namespace {
|
|||||||
template<typename ImageTraits, int color_depth>
|
template<typename ImageTraits, int color_depth>
|
||||||
int convert_color_to_allegro(color_t color, const Palette* palette) {
|
int convert_color_to_allegro(color_t color, const Palette* palette) {
|
||||||
static_assert(false && sizeof(ImageTraits), "Invalid color conversion");
|
static_assert(false && sizeof(ImageTraits), "Invalid color conversion");
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
|
@ -42,6 +42,7 @@ namespace {
|
|||||||
template<typename ImageTraits, she::SurfaceFormat format>
|
template<typename ImageTraits, she::SurfaceFormat format>
|
||||||
uint32_t convert_color_to_surface(color_t color, const Palette* palette, const she::SurfaceFormatData* fd) {
|
uint32_t convert_color_to_surface(color_t color, const Palette* palette, const she::SurfaceFormatData* fd) {
|
||||||
static_assert(false && sizeof(ImageTraits), "Invalid color conversion");
|
static_assert(false && sizeof(ImageTraits), "Invalid color conversion");
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user