aboutsummaryrefslogtreecommitdiff
path: root/include/IImage.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/IImage.h')
-rw-r--r--include/IImage.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/include/IImage.h b/include/IImage.h
index 3d4d5fa..20d3d54 100644
--- a/include/IImage.h
+++ b/include/IImage.h
@@ -9,7 +9,6 @@
#include "position2d.h"
#include "rect.h"
#include "SColor.h"
-#include "irrAllocator.h"
#include <string.h>
namespace irr
@@ -44,7 +43,7 @@ public:
delete[] Data;
if (DeleteMipMapsMemory)
- Allocator.deallocate(MipMapsData);
+ delete[] MipMapsData;
}
//! Returns the color format
@@ -275,13 +274,13 @@ public:
will by copied internally.
\param deleteMemory Whether the memory is deallocated upon
destruction. */
- void setMipMapsData(void* data, bool ownForeignMemory, bool deleteMemory)
+ void setMipMapsData(void* data, bool ownForeignMemory)
{
if (data != MipMapsData)
{
if (DeleteMipMapsMemory)
{
- Allocator.deallocate(MipMapsData);
+ delete[] MipMapsData;
DeleteMipMapsMemory = false;
}
@@ -292,7 +291,7 @@ public:
{
MipMapsData = static_cast<u8*>(data);
- DeleteMipMapsMemory = deleteMemory;
+ DeleteMipMapsMemory = false;
}
else
{
@@ -311,7 +310,7 @@ public:
dataSize += getDataSizeFromFormat(Format, width, height);
} while (width != 1 || height != 1);
- MipMapsData = Allocator.allocate(dataSize);
+ MipMapsData = new u8[dataSize];
memcpy(MipMapsData, data, dataSize);
DeleteMipMapsMemory = true;
@@ -578,7 +577,6 @@ protected:
bool DeleteMemory;
bool DeleteMipMapsMemory;
- core::irrAllocator<u8> Allocator;
#if defined(IRRLICHT_sRGB)
int Format_sRGB;
#endif