From 16732def37c5a66f3ea28dbe247b09cc6bca6677 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Fri, 6 Nov 2020 17:49:09 +0100 Subject: Cleanup: Clang-Tidy modernize-use-nullptr Replace `NULL` with `nullptr` in C++ code. No functional changes. --- source/blender/depsgraph/intern/builder/deg_builder_relations.cc | 2 +- source/blender/depsgraph/intern/depsgraph.cc | 2 +- source/blender/depsgraph/intern/depsgraph_tag.cc | 2 +- source/blender/depsgraph/intern/eval/deg_eval.cc | 2 +- source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) (limited to 'source/blender/depsgraph/intern') diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index 8741622ac89..54b6b08ab81 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -2204,7 +2204,7 @@ void DepsgraphRelationBuilder::build_object_data_geometry_datablock(ID *obdata) /* Layer parenting need react to the parent object transformation. */ LISTBASE_FOREACH (bGPDlayer *, gpl, &gpd->layers) { - if (gpl->parent != NULL) { + if (gpl->parent != nullptr) { ComponentKey gpd_geom_key(&gpd->id, NodeType::GEOMETRY); if (gpl->partype == PARBONE) { diff --git a/source/blender/depsgraph/intern/depsgraph.cc b/source/blender/depsgraph/intern/depsgraph.cc index 99804a7cd7d..5ce7570124a 100644 --- a/source/blender/depsgraph/intern/depsgraph.cc +++ b/source/blender/depsgraph/intern/depsgraph.cc @@ -287,7 +287,7 @@ void DEG_graph_replace_owners(struct Depsgraph *depsgraph, deg::Depsgraph *deg_graph = reinterpret_cast(depsgraph); const bool do_update_register = deg_graph->bmain != bmain; - if (do_update_register && deg_graph->bmain != NULL) { + if (do_update_register && deg_graph->bmain != nullptr) { deg::unregister_graph(deg_graph); } diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc index 8055e65595b..c73a3b2596a 100644 --- a/source/blender/depsgraph/intern/depsgraph_tag.cc +++ b/source/blender/depsgraph/intern/depsgraph_tag.cc @@ -617,7 +617,7 @@ void id_tag_update(Main *bmain, ID *id, int flag, eUpdateSource update_source) /* Accumulate all tags for an ID between two undo steps, so they can be * replayed for undo. */ - id->recalc_after_undo_push |= deg_recalc_flags_effective(NULL, flag); + id->recalc_after_undo_push |= deg_recalc_flags_effective(nullptr, flag); } void graph_id_tag_update( diff --git a/source/blender/depsgraph/intern/eval/deg_eval.cc b/source/blender/depsgraph/intern/eval/deg_eval.cc index 2c4b7f03db5..5b81a668a7a 100644 --- a/source/blender/depsgraph/intern/eval/deg_eval.cc +++ b/source/blender/depsgraph/intern/eval/deg_eval.cc @@ -71,7 +71,7 @@ void schedule_children(DepsgraphEvalState *state, void schedule_node_to_pool(OperationNode *node, const int UNUSED(thread_id), TaskPool *pool) { - BLI_task_pool_push(pool, deg_task_run_func, node, false, NULL); + BLI_task_pool_push(pool, deg_task_run_func, node, false, nullptr); } /* Denotes which part of dependency graph is being evaluated. */ diff --git a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc index 0a92cdb2e64..1119c16dc29 100644 --- a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc +++ b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc @@ -305,7 +305,7 @@ bool id_copy_inplace_no_main(const ID *id, ID *newid) bool result = (BKE_id_copy_ex(nullptr, (ID *)id_for_copy, &newid, - LIB_ID_COPY_LOCALIZE | LIB_ID_CREATE_NO_ALLOCATE) != NULL); + LIB_ID_COPY_LOCALIZE | LIB_ID_CREATE_NO_ALLOCATE) != nullptr); #ifdef NESTED_ID_NASTY_WORKAROUND if (result) { @@ -334,7 +334,7 @@ bool scene_copy_inplace_no_main(const Scene *scene, Scene *new_scene) bool result = (BKE_id_copy_ex(nullptr, id_for_copy, (ID **)&new_scene, - LIB_ID_COPY_LOCALIZE | LIB_ID_CREATE_NO_ALLOCATE) != NULL); + LIB_ID_COPY_LOCALIZE | LIB_ID_CREATE_NO_ALLOCATE) != nullptr); #ifdef NESTED_ID_NASTY_WORKAROUND if (result) { -- cgit v1.2.3