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-01-28 16:50:13 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-01-28 17:10:44 +0300
commit40a9b5ebc77953a3f0b47def39438beed681aac0 (patch)
tree7c59d584e43ea837a40e064a73859909f08ca84b /source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_object.cc
parent01a348274218103ecdbaddc699a97e86f0c4ce18 (diff)
Cleanup: changed NULL to nullptr in depsgraph C++ code
No functional changes.
Diffstat (limited to 'source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_object.cc')
-rw-r--r--source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_object.cc30
1 files changed, 15 insertions, 15 deletions
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_object.cc b/source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_object.cc
index a6a042f3e7b..df7338e1076 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_object.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_object.cc
@@ -52,7 +52,7 @@ void ObjectRuntimeBackup::init_from_object(Object *object)
/* Object update will override actual object->data to an evaluated version.
* Need to make sure we don't have data set to evaluated one before free
* anything. */
- if (mesh_eval != NULL && object->data == mesh_eval) {
+ if (mesh_eval != nullptr && object->data == mesh_eval) {
object->data = runtime.mesh_orig;
}
/* Make a backup of base flags. */
@@ -73,22 +73,22 @@ inline ModifierDataBackupID create_modifier_data_id(const ModifierData *modifier
void ObjectRuntimeBackup::backup_modifier_runtime_data(Object *object)
{
LISTBASE_FOREACH (ModifierData *, modifier_data, &object->modifiers) {
- if (modifier_data->runtime == NULL) {
+ if (modifier_data->runtime == nullptr) {
continue;
}
- BLI_assert(modifier_data->orig_modifier_data != NULL);
+ BLI_assert(modifier_data->orig_modifier_data != nullptr);
ModifierDataBackupID modifier_data_id = create_modifier_data_id(modifier_data);
modifier_runtime_data.insert(make_pair(modifier_data_id, modifier_data->runtime));
- modifier_data->runtime = NULL;
+ modifier_data->runtime = nullptr;
}
}
void ObjectRuntimeBackup::backup_pose_channel_runtime_data(Object *object)
{
- if (object->pose != NULL) {
+ if (object->pose != nullptr) {
LISTBASE_FOREACH (bPoseChannel *, pchan, &object->pose->chanbase) {
- /* This is NULL in Edit mode. */
- if (pchan->orig_pchan != NULL) {
+ /* This is nullptr in Edit mode. */
+ if (pchan->orig_pchan != nullptr) {
pose_channel_runtime_data[pchan->orig_pchan] = pchan->runtime;
BKE_pose_channel_runtime_reset(&pchan->runtime);
}
@@ -103,7 +103,7 @@ void ObjectRuntimeBackup::restore_to_object(Object *object)
object->runtime = runtime;
object->runtime.mesh_orig = mesh_orig;
object->runtime.bb = bb;
- if (object->type == OB_MESH && object->runtime.mesh_eval != NULL) {
+ if (object->type == OB_MESH && object->runtime.mesh_eval != nullptr) {
if (object->id.recalc & ID_RECALC_GEOMETRY) {
/* If geometry is tagged for update it means, that part of
* evaluated mesh are not valid anymore. In this case we can not
@@ -138,33 +138,33 @@ void ObjectRuntimeBackup::restore_to_object(Object *object)
void ObjectRuntimeBackup::restore_modifier_runtime_data(Object *object)
{
LISTBASE_FOREACH (ModifierData *, modifier_data, &object->modifiers) {
- BLI_assert(modifier_data->orig_modifier_data != NULL);
+ BLI_assert(modifier_data->orig_modifier_data != nullptr);
ModifierDataBackupID modifier_data_id = create_modifier_data_id(modifier_data);
ModifierRuntimeDataBackup::iterator runtime_data_iterator = modifier_runtime_data.find(
modifier_data_id);
if (runtime_data_iterator != modifier_runtime_data.end()) {
modifier_data->runtime = runtime_data_iterator->second;
- runtime_data_iterator->second = NULL;
+ runtime_data_iterator->second = nullptr;
}
}
for (ModifierRuntimeDataBackup::value_type value : modifier_runtime_data) {
const ModifierDataBackupID modifier_data_id = value.first;
void *runtime = value.second;
- if (value.second == NULL) {
+ if (value.second == nullptr) {
continue;
}
const ModifierTypeInfo *modifier_type_info = modifierType_getInfo(modifier_data_id.type);
- BLI_assert(modifier_type_info != NULL);
+ BLI_assert(modifier_type_info != nullptr);
modifier_type_info->freeRuntimeData(runtime);
}
}
void ObjectRuntimeBackup::restore_pose_channel_runtime_data(Object *object)
{
- if (object->pose != NULL) {
+ if (object->pose != nullptr) {
LISTBASE_FOREACH (bPoseChannel *, pchan, &object->pose->chanbase) {
- /* This is NULL in Edit mode. */
- if (pchan->orig_pchan != NULL) {
+ /* This is nullptr in Edit mode. */
+ if (pchan->orig_pchan != nullptr) {
PoseChannelRuntimeDataBackup::iterator runtime_data_iterator =
pose_channel_runtime_data.find(pchan->orig_pchan);
if (runtime_data_iterator != pose_channel_runtime_data.end()) {