]> git.tdb.fi Git - libs/gui.git/blobdiff - source/graphics/quartz/quartzloader.cpp
Include the matching header first in .cpp files
[libs/gui.git] / source / graphics / quartz / quartzloader.cpp
index e025b66cf4786b852ed2a176ed0ee49b7e7d977c..9a74862c590d04b53b0548f5a38b05742e91369c 100644 (file)
@@ -1,8 +1,6 @@
+#include "quartzloader.h"
 #include <algorithm>
 #include <ApplicationServices/ApplicationServices.h>
-// Avoid messing up sigc++ headers
-#undef nil
-#include "quartzloader.h"
 
 using namespace std;
 
@@ -121,7 +119,6 @@ void QuartzLoader::load_(Image::Data &data)
 {
        CGDataProviderRef dp = CGImageGetDataProvider(image);
        CFDataRef image_data = CGDataProviderCopyData(dp);
-       data.pixels = new char[data.height*data.stride];
        unsigned offset = (alpha==kCGImageAlphaNoneSkipFirst);
        CFRange range = CFRangeMake(offset, CFDataGetLength(image_data)-offset);
        CFDataGetBytes(image_data, range, reinterpret_cast<UInt8 *>(data.pixels));