]> git.tdb.fi Git - libs/gui.git/blobdiff - source/graphics/devil/devilloader.cpp
Update .gitignore to include build products on Windows
[libs/gui.git] / source / graphics / devil / devilloader.cpp
index a6693080748a001b87612615920e477e642b1018..8fbf59ccbee6150a44259437ac3f2fc78be5f02d 100644 (file)
@@ -1,7 +1,7 @@
+#include "devilloader.h"
 #include <algorithm>
 #include <msp/strings/format.h>
 #include <IL/il.h>
-#include "devilloader.h"
 
 using namespace std;
 
@@ -54,7 +54,7 @@ int tell(void *handle)
        return reinterpret_cast<Msp::IO::Seekable *>(handle)->tell();
 }
 
-std::string error_string(ILenum err)
+string error_string(ILenum err)
 {
        switch(err)
        {
@@ -135,7 +135,6 @@ void DevilLoader::load_pixels_(Image::Data &data)
        ilBindImage(id);
 
        unsigned data_size = data.stride*data.height;
-       data.pixels = new char[data_size];
        ILubyte *il_data = ilGetData();
        copy(il_data, il_data+data_size, data.pixels);