diff options
author | Hans Goudey <h.goudey@me.com> | 2022-05-30 18:46:32 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-05-30 18:46:44 +0300 |
commit | 3f9376851bca4e01296a98f68ad1d64462905b94 (patch) | |
tree | fd992870f029c9f99cfd0e5bd2163635a0b0c66d /source/blender/blenkernel/intern/volume.cc | |
parent | 3437cf155e7ca73cb96882ed5372f5baf2eac78a (diff) |
Cleanup: Clang tidy
Mostly duplicate includes, also use nullptr, and using default
member initializers.
Diffstat (limited to 'source/blender/blenkernel/intern/volume.cc')
-rw-r--r-- | source/blender/blenkernel/intern/volume.cc | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/source/blender/blenkernel/intern/volume.cc b/source/blender/blenkernel/intern/volume.cc index 307466d7dc9..82405830437 100644 --- a/source/blender/blenkernel/intern/volume.cc +++ b/source/blender/blenkernel/intern/volume.cc @@ -97,12 +97,7 @@ static struct VolumeFileCache { /* Cache Entry */ struct Entry { Entry(const std::string &filepath, const openvdb::GridBase::Ptr &grid) - : filepath(filepath), - grid_name(grid->getName()), - grid(grid), - is_loaded(false), - num_metadata_users(0), - num_tree_users(0) + : filepath(filepath), grid_name(grid->getName()), grid(grid) { } @@ -110,9 +105,7 @@ static struct VolumeFileCache { : filepath(other.filepath), grid_name(other.grid_name), grid(other.grid), - is_loaded(other.is_loaded), - num_metadata_users(0), - num_tree_users(0) + is_loaded(other.is_loaded) { } @@ -151,12 +144,12 @@ static struct VolumeFileCache { blender::Map<int, openvdb::GridBase::Ptr> simplified_grids; /* Has the grid tree been loaded? */ - mutable bool is_loaded; + mutable bool is_loaded = false; /* Error message if an error occurred while loading. */ std::string error_msg; /* User counting. */ - int num_metadata_users; - int num_tree_users; + int num_metadata_users = 0; + int num_tree_users = 0; /* Mutex for on-demand reading of tree. */ mutable std::mutex mutex; }; |