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:
authorAaron Carlisle <carlisle.b3d@gmail.com>2021-12-25 06:17:49 +0300
committerAaron Carlisle <carlisle.b3d@gmail.com>2021-12-25 06:18:04 +0300
commit6e0cf86e73fedebb1615dde664fbac4859a72b60 (patch)
treed60e9f5c90cb3e4017b89499b82b3b117817125b /source/blender/imbuf
parent79012c67849985be677cf63e363781e1992840fa (diff)
Cleanup: use new c++ guarded allocator API
API added in rBa3ad5abf2fe85d623f9e78fefc34e27bdc14632e
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r--source/blender/imbuf/intern/openexr/openexr_api.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp
index e1b9853ac21..ec8cf36dd49 100644
--- a/source/blender/imbuf/intern/openexr/openexr_api.cpp
+++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp
@@ -683,7 +683,7 @@ static bool imb_exr_multilayer_parse_channels_from_file(ExrHandle *data);
void *IMB_exr_get_handle(void)
{
- ExrHandle *data = (ExrHandle *)MEM_callocN(sizeof(ExrHandle), "exr handle");
+ ExrHandle *data = MEM_cnew<ExrHandle>("exr handle");
data->multiView = new StringVector();
BLI_addtail(&exrhandles, data);
@@ -789,7 +789,7 @@ void IMB_exr_add_channel(void *handle,
ExrHandle *data = (ExrHandle *)handle;
ExrChannel *echan;
- echan = (ExrChannel *)MEM_callocN(sizeof(ExrChannel), "exr channel");
+ echan = MEM_cnew<ExrChannel>("exr channel");
echan->m = new MultiViewChannelName();
if (layname && layname[0] != '\0') {
@@ -1496,7 +1496,7 @@ static ExrLayer *imb_exr_get_layer(ListBase *lb, char *layname)
ExrLayer *lay = (ExrLayer *)BLI_findstring(lb, layname, offsetof(ExrLayer, name));
if (lay == nullptr) {
- lay = (ExrLayer *)MEM_callocN(sizeof(ExrLayer), "exr layer");
+ lay = MEM_cnew<ExrLayer>("exr layer");
BLI_addtail(lb, lay);
BLI_strncpy(lay->name, layname, EXR_LAY_MAXNAME);
}
@@ -1509,7 +1509,7 @@ static ExrPass *imb_exr_get_pass(ListBase *lb, char *passname)
ExrPass *pass = (ExrPass *)BLI_findstring(lb, passname, offsetof(ExrPass, name));
if (pass == nullptr) {
- pass = (ExrPass *)MEM_callocN(sizeof(ExrPass), "exr pass");
+ pass = MEM_cnew<ExrPass>("exr pass");
if (STREQ(passname, "Combined")) {
BLI_addhead(lb, pass);