Cleanup: clang tidy
This commit is contained in:
parent
39f99fd05c
commit
583006d0ef
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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>);
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue