Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-08-16 16:32:48 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-08-16 16:32:48 +0400
commit3bc16fd60dd573f8289552a0046b0735d1c7e02b (patch)
tree3936a357fd922e96b622f29f04804b20cb11f234 /source/blender/compositor/operations/COM_MovieDistortionOperation.h
parent883e9df1ccdaaa847c86e2d1457fd88333b87c84 (diff)
compositor: replace C++ new/delete with guardedalloc.
Diffstat (limited to 'source/blender/compositor/operations/COM_MovieDistortionOperation.h')
-rw-r--r--source/blender/compositor/operations/COM_MovieDistortionOperation.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/source/blender/compositor/operations/COM_MovieDistortionOperation.h b/source/blender/compositor/operations/COM_MovieDistortionOperation.h
index 00723d92a84..7e62de7b9f1 100644
--- a/source/blender/compositor/operations/COM_MovieDistortionOperation.h
+++ b/source/blender/compositor/operations/COM_MovieDistortionOperation.h
@@ -25,6 +25,8 @@
#include "COM_NodeOperation.h"
#include "DNA_movieclip_types.h"
+#include "MEM_guardedalloc.h"
+
extern "C" {
#include "BKE_tracking.h"
#include "PIL_time.h"
@@ -62,22 +64,19 @@ public:
this->m_calibration_width = calibration_width;
this->m_calibration_height = calibration_height;
this->m_inverted = inverted;
- this->m_bufferCalculated = new int[this->m_width * this->m_height];
- this->m_buffer = new float[this->m_width * this->m_height * 2];
- for (int i = 0; i < this->m_width * this->m_height; i++) {
- this->m_bufferCalculated[i] = 0;
- }
+ this->m_bufferCalculated = (int *)MEM_callocN(sizeof(int) * this->m_width * this->m_height, __func__);
+ this->m_buffer = (float *)MEM_mallocN(sizeof(float) * this->m_width * this->m_height * 2, __func__);
this->updateLastUsage();
}
~DistortionCache() {
if (this->m_buffer) {
- delete[] this->m_buffer;
+ MEM_freeN(this->m_buffer);
this->m_buffer = NULL;
}
if (this->m_bufferCalculated) {
- delete[] this->m_bufferCalculated;
+ MEM_freeN(this->m_bufferCalculated);
this->m_bufferCalculated = NULL;
}
}