[Bf-blender-cvs] [25e54885946] functions: don't store particle name in particle sets structure

Jacques Lucke noreply at git.blender.org
Tue Aug 27 17:40:27 CEST 2019


Commit: 25e5488594610765bbc46e11aca0b94f620cf24d
Author: Jacques Lucke
Date:   Tue Aug 27 17:40:20 2019 +0200
Branches: functions
https://developer.blender.org/rB25e5488594610765bbc46e11aca0b94f620cf24d

don't store particle name in particle sets structure

===================================================================

M	source/blender/simulations/bparticles/particle_allocator.cpp
M	source/blender/simulations/bparticles/particle_set.cpp
M	source/blender/simulations/bparticles/particle_set.hpp

===================================================================

diff --git a/source/blender/simulations/bparticles/particle_allocator.cpp b/source/blender/simulations/bparticles/particle_allocator.cpp
index 2f03933477f..8bcc22a4edd 100644
--- a/source/blender/simulations/bparticles/particle_allocator.cpp
+++ b/source/blender/simulations/bparticles/particle_allocator.cpp
@@ -84,7 +84,7 @@ ParticleSets ParticleAllocator::request(StringRef particle_type_name, uint size)
     sets.append(ParticleSet(blocks[i]->attributes(), ranges[i].as_array_ref()));
   }
 
-  return ParticleSets(particle_type_name, attributes_info, sets);
+  return ParticleSets(attributes_info, sets);
 }
 
 }  // namespace BParticles
diff --git a/source/blender/simulations/bparticles/particle_set.cpp b/source/blender/simulations/bparticles/particle_set.cpp
index 150c7c69490..cc1570d4a3f 100644
--- a/source/blender/simulations/bparticles/particle_set.cpp
+++ b/source/blender/simulations/bparticles/particle_set.cpp
@@ -2,10 +2,8 @@
 
 namespace BParticles {
 
-ParticleSets::ParticleSets(StringRef particle_type_name,
-                           AttributesInfo &attributes_info,
-                           ArrayRef<ParticleSet> sets)
-    : m_particle_type_name(particle_type_name), m_attributes_info(attributes_info), m_sets(sets)
+ParticleSets::ParticleSets(AttributesInfo &attributes_info, ArrayRef<ParticleSet> sets)
+    : m_attributes_info(attributes_info), m_sets(sets)
 {
   m_size = 0;
   for (auto &set : sets) {
diff --git a/source/blender/simulations/bparticles/particle_set.hpp b/source/blender/simulations/bparticles/particle_set.hpp
index 4ca996a7ab0..e2a930cb22d 100644
--- a/source/blender/simulations/bparticles/particle_set.hpp
+++ b/source/blender/simulations/bparticles/particle_set.hpp
@@ -46,15 +46,12 @@ struct ParticleSet {
 
 class ParticleSets {
  private:
-  std::string m_particle_type_name;
   AttributesInfo &m_attributes_info;
   Vector<ParticleSet> m_sets;
   uint m_size;
 
  public:
-  ParticleSets(StringRef particle_type_name,
-               AttributesInfo &attributes_info,
-               ArrayRef<ParticleSet> sets);
+  ParticleSets(AttributesInfo &attributes_info, ArrayRef<ParticleSet> sets);
 
   ArrayRef<ParticleSet> sets();
 
@@ -96,8 +93,6 @@ class ParticleSets {
     this->fill<T>(index, value);
   }
 
-  StringRefNull particle_type_name();
-
   AttributesInfo &attributes_info();
 
  private:
@@ -162,11 +157,6 @@ inline ArrayRef<ParticleSet> ParticleSets::sets()
   return m_sets;
 }
 
-inline StringRefNull ParticleSets::particle_type_name()
-{
-  return m_particle_type_name;
-}
-
 inline AttributesInfo &ParticleSets::attributes_info()
 {
   return m_attributes_info;



More information about the Bf-blender-cvs mailing list