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:
authorJeroen Bakker <jeroen@blender.org>2021-06-08 14:12:49 +0300
committerJeroen Bakker <jeroen@blender.org>2021-06-08 14:12:49 +0300
commit43464c94f4def8689dd99a9e459f5ff77420d27b (patch)
tree426cf5e5ebee9ebbc87b6043e4a159f3eaa13ae4 /source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_lines.cc
parent322a6144972a855b18ed80a3cdb45c44d036663f (diff)
Cleanup: use cpp new/delete.
Diffstat (limited to 'source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_lines.cc')
-rw-r--r--source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_lines.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_lines.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_lines.cc
index ccc382c1b06..299c4332573 100644
--- a/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_lines.cc
+++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_lines.cc
@@ -35,7 +35,7 @@ static void *extract_lines_init(const MeshRenderData *mr,
struct MeshBatchCache *UNUSED(cache),
void *UNUSED(buf))
{
- GPUIndexBufBuilder *elb = static_cast<GPUIndexBufBuilder *>(MEM_mallocN(sizeof(*elb), __func__));
+ GPUIndexBufBuilder *elb = new GPUIndexBufBuilder();
/* Put loose edges at the end. */
GPU_indexbuf_init(
elb, GPU_PRIM_LINES, mr->edge_len + mr->edge_loose_len, mr->loop_len + mr->loop_loose_len);
@@ -146,7 +146,7 @@ static void extract_lines_finish(const MeshRenderData *UNUSED(mr),
GPUIndexBufBuilder *elb = static_cast<GPUIndexBufBuilder *>(data);
GPUIndexBuf *ibo = static_cast<GPUIndexBuf *>(buf);
GPU_indexbuf_build_in_place(elb, ibo);
- MEM_freeN(elb);
+ delete elb;
}
constexpr MeshExtract create_extractor_lines()
@@ -190,7 +190,7 @@ static void extract_lines_with_lines_loose_finish(const MeshRenderData *mr,
GPUIndexBuf *ibo = static_cast<GPUIndexBuf *>(buf);
GPU_indexbuf_build_in_place(elb, ibo);
extract_lines_loose_subbuffer(mr, cache);
- MEM_freeN(elb);
+ delete(elb);
}
constexpr MeshExtract create_extractor_lines_with_lines_loose()
@@ -221,7 +221,7 @@ static void *extract_lines_loose_only_init(const MeshRenderData *mr,
BLI_assert(buf == cache->final.ibo.lines_loose);
UNUSED_VARS_NDEBUG(buf);
extract_lines_loose_subbuffer(mr, cache);
- return NULL;
+ return nullptr;
}
constexpr MeshExtract create_extractor_lines_loose_only()