diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-05-22 11:12:13 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-05-22 11:12:13 +0300 |
commit | fbbc0229b85676093e498cc8c23d196ae65c014f (patch) | |
tree | e579c98aec7907fd40270acd626a45b3a9f52bc6 /source/blender | |
parent | b87d81be96a149344fdc53fab09f53077f5c9cfb (diff) |
Cleanup: only use nullptr in USD exporter
This removes all use of `NULL` from the USD Exporter, also when calling
into C code.
No functional changes.
Diffstat (limited to 'source/blender')
4 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/io/usd/intern/abstract_hierarchy_iterator.cc b/source/blender/io/usd/intern/abstract_hierarchy_iterator.cc index e382fa6bb1d..ab83ea2c3c4 100644 --- a/source/blender/io/usd/intern/abstract_hierarchy_iterator.cc +++ b/source/blender/io/usd/intern/abstract_hierarchy_iterator.cc @@ -53,7 +53,7 @@ bool HierarchyContext::operator<(const HierarchyContext &other) const if (object != other.object) { return object < other.object; } - if (duplicator != NULL && duplicator == other.duplicator) { + if (duplicator != nullptr && duplicator == other.duplicator) { // Only resort to string comparisons when both objects are created by the same duplicator. return export_name < other.export_name; } diff --git a/source/blender/io/usd/intern/usd_capi.cc b/source/blender/io/usd/intern/usd_capi.cc index f8e0a03abfa..890e2fd205f 100644 --- a/source/blender/io/usd/intern/usd_capi.cc +++ b/source/blender/io/usd/intern/usd_capi.cc @@ -185,7 +185,7 @@ bool USD_export(bContext *C, /* setup job */ WM_jobs_customdata_set(wm_job, job, MEM_freeN); WM_jobs_timer(wm_job, 0.1, NC_SCENE | ND_FRAME, NC_SCENE | ND_FRAME); - WM_jobs_callbacks(wm_job, USD::export_startjob, NULL, NULL, USD::export_endjob); + WM_jobs_callbacks(wm_job, USD::export_startjob, nullptr, nullptr, USD::export_endjob); WM_jobs_start(CTX_wm_manager(C), wm_job); } diff --git a/source/blender/io/usd/intern/usd_writer_mesh.cc b/source/blender/io/usd/intern/usd_writer_mesh.cc index 909869d2af1..841501bcf42 100644 --- a/source/blender/io/usd/intern/usd_writer_mesh.cc +++ b/source/blender/io/usd/intern/usd_writer_mesh.cc @@ -79,7 +79,7 @@ void USDGenericMeshWriter::do_write(HierarchyContext &context) bool needsfree = false; Mesh *mesh = get_export_mesh(object_eval, needsfree); - if (mesh == NULL) { + if (mesh == nullptr) { return; } @@ -100,7 +100,7 @@ void USDGenericMeshWriter::do_write(HierarchyContext &context) void USDGenericMeshWriter::free_export_mesh(Mesh *mesh) { - BKE_id_free(NULL, mesh); + BKE_id_free(nullptr, mesh); } struct USDMeshData { diff --git a/source/blender/io/usd/intern/usd_writer_transform.cc b/source/blender/io/usd/intern/usd_writer_transform.cc index 038f2b17b1a..0694d873002 100644 --- a/source/blender/io/usd/intern/usd_writer_transform.cc +++ b/source/blender/io/usd/intern/usd_writer_transform.cc @@ -50,7 +50,7 @@ void USDTransformWriter::do_write(HierarchyContext &context) bool USDTransformWriter::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. */ |