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 <campbell@blender.org>2022-08-28 13:52:28 +0300
committerCampbell Barton <campbell@blender.org>2022-08-28 13:52:28 +0300
commit28750bcf7e8b73d9da015898a3c0f21ef5d761f2 (patch)
tree45c9c2b24632d811fd6a4eca84a0a9818b9fc47b /source/blender/draw
parent7269ee4dbbc2d46eee864029772aa0e167cd267a (diff)
Cleanup: replace NULL with nullptr for C++ files
Diffstat (limited to 'source/blender/draw')
-rw-r--r--source/blender/draw/intern/draw_cache_impl_pointcloud.cc16
-rw-r--r--source/blender/draw/intern/draw_cache_impl_subdivision.cc2
2 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl_pointcloud.cc b/source/blender/draw/intern/draw_cache_impl_pointcloud.cc
index d99af0c77e4..57efed855f5 100644
--- a/source/blender/draw/intern/draw_cache_impl_pointcloud.cc
+++ b/source/blender/draw/intern/draw_cache_impl_pointcloud.cc
@@ -55,7 +55,7 @@ static bool pointcloud_batch_cache_valid(PointCloud &pointcloud)
{
PointCloudBatchCache *cache = pointcloud_batch_cache_get(pointcloud);
- if (cache == NULL) {
+ if (cache == nullptr) {
return false;
}
if (cache->mat_len != DRW_pointcloud_material_count_get(&pointcloud)) {
@@ -86,7 +86,7 @@ static void pointcloud_batch_cache_init(PointCloud &pointcloud)
void DRW_pointcloud_batch_cache_dirty_tag(PointCloud *pointcloud, int mode)
{
PointCloudBatchCache *cache = pointcloud_batch_cache_get(*pointcloud);
- if (cache == NULL) {
+ if (cache == nullptr) {
return;
}
switch (mode) {
@@ -137,7 +137,7 @@ static void pointcloud_batch_cache_ensure_pos(const PointCloud &pointcloud,
PointCloudBatchCache &cache)
{
using namespace blender;
- if (cache.pos != NULL) {
+ if (cache.pos != nullptr) {
return;
}
@@ -198,7 +198,7 @@ static const uint half_octahedron_tris[4][3] = {
static void pointcloud_batch_cache_ensure_geom(PointCloudBatchCache &cache)
{
- if (cache.geom != NULL) {
+ if (cache.geom != nullptr) {
return;
}
@@ -232,9 +232,9 @@ GPUBatch *DRW_pointcloud_batch_cache_get_dots(Object *ob)
PointCloud &pointcloud = *static_cast<PointCloud *>(ob->data);
PointCloudBatchCache *cache = pointcloud_batch_cache_get(pointcloud);
- if (cache->dots == NULL) {
+ if (cache->dots == nullptr) {
pointcloud_batch_cache_ensure_pos(pointcloud, *cache);
- cache->dots = GPU_batch_create(GPU_PRIM_POINTS, cache->pos, NULL);
+ cache->dots = GPU_batch_create(GPU_PRIM_POINTS, cache->pos, nullptr);
}
return cache->dots;
@@ -245,7 +245,7 @@ GPUBatch *DRW_pointcloud_batch_cache_get_surface(Object *ob)
PointCloud &pointcloud = *static_cast<PointCloud *>(ob->data);
PointCloudBatchCache *cache = pointcloud_batch_cache_get(pointcloud);
- if (cache->surface == NULL) {
+ if (cache->surface == nullptr) {
pointcloud_batch_cache_ensure_pos(pointcloud, *cache);
pointcloud_batch_cache_ensure_geom(*cache);
@@ -265,7 +265,7 @@ GPUBatch **DRW_cache_pointcloud_surface_shaded_get(Object *ob,
BLI_assert(cache->mat_len == gpumat_array_len);
UNUSED_VARS(gpumat_array_len);
- if (cache->surface_per_mat[0] == NULL) {
+ if (cache->surface_per_mat[0] == nullptr) {
pointcloud_batch_cache_ensure_pos(pointcloud, *cache);
pointcloud_batch_cache_ensure_geom(*cache);
diff --git a/source/blender/draw/intern/draw_cache_impl_subdivision.cc b/source/blender/draw/intern/draw_cache_impl_subdivision.cc
index e86e342fea0..f6242aa072d 100644
--- a/source/blender/draw/intern/draw_cache_impl_subdivision.cc
+++ b/source/blender/draw/intern/draw_cache_impl_subdivision.cc
@@ -724,7 +724,7 @@ static void draw_subdiv_cache_update_extra_coarse_face_data(DRWSubdivCache *cach
if (mr->extract_type == MR_EXTRACT_BMESH) {
draw_subdiv_cache_extra_coarse_face_data_bm(cache->bm, mr->efa_act, flags_data);
}
- else if (mr->p_origindex != NULL) {
+ else if (mr->p_origindex != nullptr) {
draw_subdiv_cache_extra_coarse_face_data_mapped(mesh, cache->bm, mr, flags_data);
}
else {