X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgraphics%2Fimage.cpp;h=813672bca52d8fdec846629e53845af9c3a6dd17;hb=e82345f2c1286e684789854c7dbe32411bb0b05f;hp=2903d499f75cfcb815a02f48de869b875bff54ef;hpb=30cab36b531f6efddca07c3fe9a6b1b81ca42bde;p=libs%2Fgui.git diff --git a/source/graphics/image.cpp b/source/graphics/image.cpp index 2903d49..813672b 100644 --- a/source/graphics/image.cpp +++ b/source/graphics/image.cpp @@ -10,20 +10,12 @@ using namespace std; namespace Msp { namespace Graphics { -Image::Data::Data(): - fmt(RGB), - width(0), - height(0), - owned_pixels(0), - pixels(0) -{ } - Image::Data::Data(const Data &other): fmt(other.fmt), width(other.width), height(other.height), stride(other.stride), - owned_pixels(other.pixels ? new char[stride*height] : 0), + owned_pixels(other.pixels ? new char[stride*height] : nullptr), pixels(owned_pixels) { if(pixels) @@ -33,7 +25,7 @@ Image::Data::Data(const Data &other): Image::Data &Image::Data::operator=(const Data &other) { delete[] owned_pixels; - pixels = owned_pixels = 0; + pixels = owned_pixels = nullptr; fmt = other.fmt; width = other.width;