]> git.tdb.fi Git - libs/gui.git/blobdiff - source/graphics/bmploader.cpp
Rename Image::Data::data to pixels
[libs/gui.git] / source / graphics / bmploader.cpp
index 086648bfe7b3eb26bb4f079ad95281a1b151fc9d..f711dc1e8d66b2c50761ceab07ecdc72a97b8bf9 100644 (file)
@@ -38,7 +38,7 @@ BmpLoader::BmpLoader(IO::Base &i, unsigned sb):
 
 bool BmpLoader::detect(const std::string &sig)
 {
-       static const char bmp_sig[] = "BM";
+       static const char bmp_sig[] = { 'B', 'M' };
        if(sig.size()<sizeof(bmp_sig))
                return false;
        return !sig.compare(0, sizeof(bmp_sig), bmp_sig, sizeof(bmp_sig));
@@ -92,16 +92,16 @@ void BmpLoader::load(Image::Data &data)
                skip -= size;
        }
 
-       data.data = new char[data.stride*data.height];
+       data.pixels = new char[data.stride*data.height];
        if(height<0)
        {
                for(unsigned y=0; y<data.height; ++y)
-                       read_full(io, data.data+(data.height-1-y)*data.stride, data.stride);
+                       read_full(io, data.pixels+(data.height-1-y)*data.stride, data.stride);
        }
        else
        {
                for(unsigned y=0; y<data.height; ++y)
-                       read_full(io, data.data+y*data.stride, data.stride);
+                       read_full(io, data.pixels+y*data.stride, data.stride);
        }
 }