X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgbase%2Fimage.cpp;h=0cd0aff4c78340e16c64ce38fcb8ece76075e194;hb=5add89fdd5e5e542ae0e93de2fe9d9b2532c1e07;hp=c4b3a5a18eed0684d1bb14ad864bc459b5d88839;hpb=5b2c1ec3d21ae3d772354c75a8f522f856958127;p=libs%2Fgui.git diff --git a/source/gbase/image.cpp b/source/gbase/image.cpp index c4b3a5a..0cd0aff 100644 --- a/source/gbase/image.cpp +++ b/source/gbase/image.cpp @@ -153,6 +153,7 @@ Image::~Image() #ifdef WITH_LIBPNG delete[] priv->data; #endif + delete priv; } void Image::load_file(const string &fn) @@ -175,6 +176,7 @@ void Image::load_file(const string &fn) throw Exception("Not a PNG image and DevIL support not compiled in"); #endif } + (void)fn; } void Image::load_memory(const void *data, unsigned size) @@ -195,9 +197,10 @@ void Image::load_memory(const void *data, unsigned size) throw Exception("Error loading image from memory"); #else throw Exception("Not a PNG image and DevIL support not compiled in"); - //(void)data; (void)size; #endif } + (void)data; + (void)size; } PixelFormat Image::get_format() const @@ -246,7 +249,7 @@ unsigned Image::get_height() const { #ifdef WITH_LIBPNG if(priv->data) - return priv->width; + return priv->height; #endif #ifdef WITH_DEVIL if(priv->id)