diff options
9 files changed, 18 insertions, 20 deletions
diff --git a/source/blender/blenkernel/intern/cryptomatte.cc b/source/blender/blenkernel/intern/cryptomatte.cc index 3ed66960162..1dd71dacc46 100644 --- a/source/blender/blenkernel/intern/cryptomatte.cc +++ b/source/blender/blenkernel/intern/cryptomatte.cc @@ -121,13 +121,13 @@ CryptomatteSession *BKE_cryptomatte_init(void) void BKE_cryptomatte_finish(CryptomatteSession *session) { - BLI_assert(session != NULL); + BLI_assert(session != nullptr); session->finish(); } void BKE_cryptomatte_free(CryptomatteSession *session) { - BLI_assert(session != NULL); + BLI_assert(session != nullptr); delete session; } @@ -157,7 +157,7 @@ uint32_t BKE_cryptomatte_object_hash(CryptomatteSession *session, const Object * uint32_t BKE_cryptomatte_material_hash(CryptomatteSession *session, const Material *material) { - if (material == NULL) { + if (material == nullptr) { return 0.0f; } return cryptomatte_hash(&session->materials, &material->id); @@ -166,7 +166,7 @@ uint32_t BKE_cryptomatte_material_hash(CryptomatteSession *session, const Materi uint32_t BKE_cryptomatte_asset_hash(CryptomatteSession *session, const Object *object) { const Object *asset_object = object; - while (asset_object->parent != NULL) { + while (asset_object->parent != nullptr) { asset_object = asset_object->parent; } return cryptomatte_hash(&session->assets, &asset_object->id); diff --git a/source/blender/blenkernel/intern/icons.cc b/source/blender/blenkernel/intern/icons.cc index fbf69357478..cba1726a1b9 100644 --- a/source/blender/blenkernel/intern/icons.cc +++ b/source/blender/blenkernel/intern/icons.cc @@ -92,10 +92,10 @@ std::mutex gIconMutex; static GHash *gCachedPreviews = nullptr; /* Queue of icons for deferred deletion. */ -typedef struct DeferredIconDeleteNode { +struct DeferredIconDeleteNode { struct DeferredIconDeleteNode *next; int icon_id; -} DeferredIconDeleteNode; +}; /* Protected by gIconMutex. */ static LockfreeLinkList g_icon_delete_queue; diff --git a/source/blender/blenkernel/intern/mesh_fair.cc b/source/blender/blenkernel/intern/mesh_fair.cc index ccd1434b60b..75dd396d10a 100644 --- a/source/blender/blenkernel/intern/mesh_fair.cc +++ b/source/blender/blenkernel/intern/mesh_fair.cc @@ -361,7 +361,6 @@ class UniformVertexWeight : public VertexWeight { } } } - ~UniformVertexWeight() = default; float weight_at_index(const int index) override { @@ -415,7 +414,6 @@ class VoronoiVertexWeight : public VertexWeight { vertex_weights_[i] = area != 0.0f ? 1.0f / area : 1e12; } } - ~VoronoiVertexWeight() = default; float weight_at_index(const int index) override { diff --git a/source/blender/blenkernel/intern/volume.cc b/source/blender/blenkernel/intern/volume.cc index 67727d87161..eadb01c43fc 100644 --- a/source/blender/blenkernel/intern/volume.cc +++ b/source/blender/blenkernel/intern/volume.cc @@ -252,7 +252,7 @@ static struct VolumeFileCache { } /* Cache contents */ - typedef std::unordered_set<Entry, EntryHasher, EntryEqual> EntrySet; + using EntrySet = std::unordered_set<Entry, EntryHasher, EntryEqual>; EntrySet cache; /* Mutex for multithreaded access. */ std::mutex mutex; diff --git a/source/blender/compositor/operations/COM_ColorExposureOperation.cpp b/source/blender/compositor/operations/COM_ColorExposureOperation.cpp index 8a475432cc8..a11039852a1 100644 --- a/source/blender/compositor/operations/COM_ColorExposureOperation.cpp +++ b/source/blender/compositor/operations/COM_ColorExposureOperation.cpp @@ -18,12 +18,12 @@ #include "COM_ColorExposureOperation.h" -ExposureOperation::ExposureOperation() : NodeOperation() +ExposureOperation::ExposureOperation() { this->addInputSocket(COM_DT_COLOR); this->addInputSocket(COM_DT_VALUE); this->addOutputSocket(COM_DT_COLOR); - this->m_inputProgram = NULL; + this->m_inputProgram = nullptr; } void ExposureOperation::initExecution() @@ -52,6 +52,6 @@ void ExposureOperation::executePixelSampled(float output[4], void ExposureOperation::deinitExecution() { - this->m_inputProgram = NULL; - this->m_inputExposureProgram = NULL; + this->m_inputProgram = nullptr; + this->m_inputExposureProgram = nullptr; } diff --git a/source/blender/editors/object/object_bake_api.c b/source/blender/editors/object/object_bake_api.c index dcc8ccf01e1..37dd320dcd0 100644 --- a/source/blender/editors/object/object_bake_api.c +++ b/source/blender/editors/object/object_bake_api.c @@ -674,7 +674,7 @@ static bool bake_targets_init_image_textures(const BakeAPIRender *bkr, reports, RPT_ERROR, "No active image found, add a material or bake to an external file"); return false; } - else if (bkr->is_split_materials) { + if (bkr->is_split_materials) { BKE_report( reports, RPT_ERROR, @@ -1120,7 +1120,7 @@ static bool bake_targets_output(const BakeAPIRender *bkr, if (bkr->save_mode == R_BAKE_SAVE_INTERNAL) { return bake_targets_output_internal(bkr, targets, ob, pixel_array, reports); } - else if (bkr->save_mode == R_BAKE_SAVE_EXTERNAL) { + if (bkr->save_mode == R_BAKE_SAVE_EXTERNAL) { return bake_targets_output_external(bkr, targets, ob, ob_eval, me, pixel_array, reports); } } diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index 850e1382f47..be3c2604eb2 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -1877,7 +1877,7 @@ static bool modifier_copy_to_selected_poll(bContext *C) found_supported_objects = true; break; } - else if (BKE_object_support_modifier_type_check(ob, md->type)) { + if (BKE_object_support_modifier_type_check(ob, md->type)) { found_supported_objects = true; break; } diff --git a/source/blender/nodes/geometry/node_geometry_util.hh b/source/blender/nodes/geometry/node_geometry_util.hh index d9c066d576f..7c4963b1f3f 100644 --- a/source/blender/nodes/geometry/node_geometry_util.hh +++ b/source/blender/nodes/geometry/node_geometry_util.hh @@ -42,7 +42,7 @@ namespace blender::nodes { void update_attribute_input_socket_availabilities(bNode &node, const StringRef name, const GeometryNodeAttributeInputMode mode, - const bool can_be_available = true); + const bool name_is_available = true); CustomDataType attribute_domain_highest_complexity(Span<CustomDataType>); diff --git a/source/blender/nodes/geometry/nodes/node_geo_point_distribute_poisson_disk.cc b/source/blender/nodes/geometry/nodes/node_geo_point_distribute_poisson_disk.cc index 9f49fe3f5f4..005fec71f86 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_point_distribute_poisson_disk.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_point_distribute_poisson_disk.cc @@ -264,18 +264,18 @@ static void progressive_sampling_reorder(Vector<float3> *output_points, void poisson_disk_point_elimination(Vector<float3> const *input_points, Vector<float3> *output_points, - float maximum_density, + float maximum_distance, float3 boundbox) { weighted_sample_elimination(input_points->data(), input_points->size(), output_points->data(), output_points->size(), - maximum_density, + maximum_distance, boundbox, false); - progressive_sampling_reorder(output_points, maximum_density, boundbox); + progressive_sampling_reorder(output_points, maximum_distance, boundbox); } } // namespace blender::nodes |