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:
authorSybren A. Stüvel <sybren@blender.org>2020-11-06 19:49:09 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-11-06 20:08:25 +0300
commit16732def37c5a66f3ea28dbe247b09cc6bca6677 (patch)
tree5d14f5c920a1411e336bd80b12becbb3f73de19a /source/blender/io/alembic/exporter
parent88926375a0e4e45f72c87b9e487c060ddd3c9216 (diff)
Cleanup: Clang-Tidy modernize-use-nullptr
Replace `NULL` with `nullptr` in C++ code. No functional changes.
Diffstat (limited to 'source/blender/io/alembic/exporter')
-rw-r--r--source/blender/io/alembic/exporter/abc_export_capi.cc4
-rw-r--r--source/blender/io/alembic/exporter/abc_writer_curves.cc4
-rw-r--r--source/blender/io/alembic/exporter/abc_writer_hair.cc6
-rw-r--r--source/blender/io/alembic/exporter/abc_writer_nurbs.cc4
-rw-r--r--source/blender/io/alembic/exporter/abc_writer_points.cc2
-rw-r--r--source/blender/io/alembic/exporter/abc_writer_transform.cc2
6 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/io/alembic/exporter/abc_export_capi.cc b/source/blender/io/alembic/exporter/abc_export_capi.cc
index 7663d1790b6..5b8998a0b1a 100644
--- a/source/blender/io/alembic/exporter/abc_export_capi.cc
+++ b/source/blender/io/alembic/exporter/abc_export_capi.cc
@@ -227,8 +227,8 @@ bool ABC_export(Scene *scene,
WM_jobs_timer(wm_job, 0.1, NC_SCENE | ND_FRAME, NC_SCENE | ND_FRAME);
WM_jobs_callbacks(wm_job,
blender::io::alembic::export_startjob,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
blender::io::alembic::export_endjob);
WM_jobs_start(CTX_wm_manager(C), wm_job);
diff --git a/source/blender/io/alembic/exporter/abc_writer_curves.cc b/source/blender/io/alembic/exporter/abc_writer_curves.cc
index b57af345a3c..5e01609f930 100644
--- a/source/blender/io/alembic/exporter/abc_writer_curves.cc
+++ b/source/blender/io/alembic/exporter/abc_writer_curves.cc
@@ -135,7 +135,7 @@ void ABCCurveWriter::do_write(HierarchyContext &context)
}
}
- if (nurbs->knotsu != NULL) {
+ if (nurbs->knotsu != nullptr) {
const size_t num_knots = KNOTSU(nurbs);
/* Add an extra knot at the beginning and end of the array since most apps
@@ -189,7 +189,7 @@ ABCCurveMeshWriter::ABCCurveMeshWriter(const ABCWriterConstructorArgs &args)
Mesh *ABCCurveMeshWriter::get_export_mesh(Object *object_eval, bool &r_needsfree)
{
Mesh *mesh_eval = BKE_object_get_evaluated_mesh(object_eval);
- if (mesh_eval != NULL) {
+ if (mesh_eval != nullptr) {
/* Mesh_eval only exists when generative modifiers are in use. */
r_needsfree = false;
return mesh_eval;
diff --git a/source/blender/io/alembic/exporter/abc_writer_hair.cc b/source/blender/io/alembic/exporter/abc_writer_hair.cc
index b70c835215d..7d0f9bf64f0 100644
--- a/source/blender/io/alembic/exporter/abc_writer_hair.cc
+++ b/source/blender/io/alembic/exporter/abc_writer_hair.cc
@@ -163,7 +163,7 @@ void ABCHairWriter::write_hair_sample(const HierarchyContext &context,
if (num < mesh->totface) {
/* TODO(Sybren): check whether the NULL check here and if(mface) are actually required */
- MFace *face = mface == NULL ? NULL : &mface[num];
+ MFace *face = mface == nullptr ? nullptr : &mface[num];
MTFace *tface = mtface + num;
if (mface) {
@@ -172,7 +172,7 @@ void ABCHairWriter::write_hair_sample(const HierarchyContext &context,
psys_interpolate_uvs(tface, face->v4, pa->fuv, r_uv);
uv_values.emplace_back(r_uv[0], r_uv[1]);
- psys_interpolate_face(mverts, face, tface, NULL, mapfw, vec, normal, NULL, NULL, NULL);
+ psys_interpolate_face(mverts, face, tface, nullptr, mapfw, vec, normal, nullptr, nullptr, nullptr);
copy_yup_from_zup(tmp_nor.getValue(), normal);
norm_values.push_back(tmp_nor);
@@ -279,7 +279,7 @@ void ABCHairWriter::write_hair_child_sample(const HierarchyContext &context,
psys_interpolate_uvs(tface, face->v4, pc->fuv, r_uv);
uv_values.emplace_back(r_uv[0], r_uv[1]);
- psys_interpolate_face(mverts, face, tface, NULL, mapfw, vec, tmpnor, NULL, NULL, NULL);
+ psys_interpolate_face(mverts, face, tface, nullptr, mapfw, vec, tmpnor, nullptr, nullptr, nullptr);
/* Convert Z-up to Y-up. */
norm_values.emplace_back(tmpnor[0], tmpnor[2], -tmpnor[1]);
diff --git a/source/blender/io/alembic/exporter/abc_writer_nurbs.cc b/source/blender/io/alembic/exporter/abc_writer_nurbs.cc
index 7595a0eba63..ce451eb1428 100644
--- a/source/blender/io/alembic/exporter/abc_writer_nurbs.cc
+++ b/source/blender/io/alembic/exporter/abc_writer_nurbs.cc
@@ -93,7 +93,7 @@ bool ABCNurbsWriter::check_is_animated(const HierarchyContext &context) const
{
/* Check if object has shape keys. */
Curve *cu = static_cast<Curve *>(context.object->data);
- return (cu->key != NULL);
+ return (cu->key != nullptr);
}
bool ABCNurbsWriter::is_supported(const HierarchyContext *context) const
@@ -126,7 +126,7 @@ void ABCNurbsWriter::do_write(HierarchyContext &context)
Curve *curve = static_cast<Curve *>(context.object->data);
ListBase *nulb;
- if (context.object->runtime.curve_cache->deformed_nurbs.first != NULL) {
+ if (context.object->runtime.curve_cache->deformed_nurbs.first != nullptr) {
nulb = &context.object->runtime.curve_cache->deformed_nurbs;
}
else {
diff --git a/source/blender/io/alembic/exporter/abc_writer_points.cc b/source/blender/io/alembic/exporter/abc_writer_points.cc
index eb5e51b5674..70608fdbe92 100644
--- a/source/blender/io/alembic/exporter/abc_writer_points.cc
+++ b/source/blender/io/alembic/exporter/abc_writer_points.cc
@@ -131,7 +131,7 @@ void ABCPointsWriter::do_write(HierarchyContext &context)
if (psys->lattice_deform_data) {
BKE_lattice_deform_data_destroy(psys->lattice_deform_data);
- psys->lattice_deform_data = NULL;
+ psys->lattice_deform_data = nullptr;
}
Alembic::Abc::P3fArraySample psample(points);
diff --git a/source/blender/io/alembic/exporter/abc_writer_transform.cc b/source/blender/io/alembic/exporter/abc_writer_transform.cc
index 7b1fa87de64..7fe9fd933c5 100644
--- a/source/blender/io/alembic/exporter/abc_writer_transform.cc
+++ b/source/blender/io/alembic/exporter/abc_writer_transform.cc
@@ -112,7 +112,7 @@ OObject ABCTransformWriter::get_alembic_object() const
bool ABCTransformWriter::check_is_animated(const HierarchyContext &context) const
{
- if (context.duplicator != NULL) {
+ if (context.duplicator != nullptr) {
/* This object is being duplicated, so could be emitted by a particle system and thus
* influenced by forces. TODO(Sybren): Make this more strict. Probably better to get from the
* depsgraph whether this object instance has a time source. */