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:
authorJacques Lucke <jacques@blender.org>2021-01-05 19:04:02 +0300
committerJacques Lucke <jacques@blender.org>2021-01-05 19:04:02 +0300
commit583006d0ef1a0b71c66dfab9c37cc4de27cf81d4 (patch)
treeab1182bd569efba44feb27f38498a1e08d9db629 /source/blender/blenkernel
parent39f99fd05c353137130afd7fb101c9a78106d47b (diff)
Cleanup: clang tidy
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/cryptomatte.cc8
-rw-r--r--source/blender/blenkernel/intern/icons.cc4
-rw-r--r--source/blender/blenkernel/intern/mesh_fair.cc2
-rw-r--r--source/blender/blenkernel/intern/volume.cc2
4 files changed, 7 insertions, 9 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;