[Bf-blender-cvs] [551ca281084] functions: remove unused parameter
Jacques Lucke
noreply at git.blender.org
Mon Sep 2 19:02:28 CEST 2019
Commit: 551ca281084d9d6ec8237a999153afec6c4e8bf0
Author: Jacques Lucke
Date: Mon Sep 2 18:13:24 2019 +0200
Branches: functions
https://developer.blender.org/rB551ca281084d9d6ec8237a999153afec6c4e8bf0
remove unused parameter
===================================================================
M source/blender/simulations/bparticles/node_frontend.cpp
M source/blender/simulations/bparticles/simulate.cpp
M source/blender/simulations/bparticles/simulate.hpp
M source/blender/simulations/bparticles/step_description_interfaces.cpp
M source/blender/simulations/bparticles/step_description_interfaces.hpp
===================================================================
diff --git a/source/blender/simulations/bparticles/node_frontend.cpp b/source/blender/simulations/bparticles/node_frontend.cpp
index dcdd1bf315b..814750eabbb 100644
--- a/source/blender/simulations/bparticles/node_frontend.cpp
+++ b/source/blender/simulations/bparticles/node_frontend.cpp
@@ -544,7 +544,7 @@ class NodeTreeStepSimulator : public StepSimulator {
types_to_simulate.add_new(name, type_info);
}
- simulate_particles(simulation_state, world_transition, emitters, types_to_simulate);
+ simulate_particles(simulation_state, emitters, types_to_simulate);
for (Emitter *emitter : emitters) {
delete emitter;
diff --git a/source/blender/simulations/bparticles/simulate.cpp b/source/blender/simulations/bparticles/simulate.cpp
index a0bae446afe..96434894315 100644
--- a/source/blender/simulations/bparticles/simulate.cpp
+++ b/source/blender/simulations/bparticles/simulate.cpp
@@ -560,12 +560,11 @@ BLI_NOINLINE static void simulate_all_existing_blocks(
BLI_NOINLINE static void create_particles_from_emitters(ParticleAllocators &block_allocators,
ArrayRef<Emitter *> emitters,
- TimeSpan time_span,
- WorldTransition &world_transition)
+ TimeSpan time_span)
{
ParticleAllocator &emitter_allocator = block_allocators.new_allocator();
for (Emitter *emitter : emitters) {
- EmitterInterface interface(emitter_allocator, time_span, world_transition);
+ EmitterInterface interface(emitter_allocator, time_span);
emitter->emit(interface);
}
}
@@ -574,15 +573,14 @@ BLI_NOINLINE static void emit_and_simulate_particles(
ParticlesState &state,
TimeSpan time_span,
ArrayRef<Emitter *> emitters,
- StringMap<ParticleTypeInfo> &types_to_simulate,
- WorldTransition &world_transition)
+ StringMap<ParticleTypeInfo> &types_to_simulate)
{
Vector<ParticlesBlock *> newly_created_blocks;
{
ParticleAllocators block_allocators(state);
simulate_all_existing_blocks(state, types_to_simulate, block_allocators, time_span);
- create_particles_from_emitters(block_allocators, emitters, time_span, world_transition);
+ create_particles_from_emitters(block_allocators, emitters, time_span);
newly_created_blocks = block_allocators.gather_allocated_blocks();
}
@@ -595,7 +593,6 @@ BLI_NOINLINE static void emit_and_simulate_particles(
}
void simulate_particles(SimulationState &state,
- WorldTransition &world_transition,
ArrayRef<Emitter *> emitters,
StringMap<ParticleTypeInfo> &types_to_simulate)
{
@@ -606,11 +603,8 @@ void simulate_particles(SimulationState &state,
ensure_required_containers_exist(particles_state, types_to_simulate);
ensure_required_attributes_exist(particles_state, types_to_simulate);
- emit_and_simulate_particles(particles_state,
- state.time().current_update_time(),
- emitters,
- types_to_simulate,
- world_transition);
+ emit_and_simulate_particles(
+ particles_state, state.time().current_update_time(), emitters, types_to_simulate);
compress_all_containers(particles_state);
}
diff --git a/source/blender/simulations/bparticles/simulate.hpp b/source/blender/simulations/bparticles/simulate.hpp
index 9a519d3fe77..0d7342b5864 100644
--- a/source/blender/simulations/bparticles/simulate.hpp
+++ b/source/blender/simulations/bparticles/simulate.hpp
@@ -14,7 +14,6 @@ struct ParticleTypeInfo {
};
void simulate_particles(SimulationState &state,
- WorldTransition &world_transition,
ArrayRef<Emitter *> emitters,
StringMap<ParticleTypeInfo> &types_to_simulate);
diff --git a/source/blender/simulations/bparticles/step_description_interfaces.cpp b/source/blender/simulations/bparticles/step_description_interfaces.cpp
index d9c854122f5..e04d8271274 100644
--- a/source/blender/simulations/bparticles/step_description_interfaces.cpp
+++ b/source/blender/simulations/bparticles/step_description_interfaces.cpp
@@ -2,12 +2,8 @@
namespace BParticles {
-EmitterInterface::EmitterInterface(ParticleAllocator &particle_allocator,
- TimeSpan time_span,
- WorldTransition &world_transition)
- : m_particle_allocator(particle_allocator),
- m_time_span(time_span),
- m_world_transition(world_transition)
+EmitterInterface::EmitterInterface(ParticleAllocator &particle_allocator, TimeSpan time_span)
+ : m_particle_allocator(particle_allocator), m_time_span(time_span)
{
}
diff --git a/source/blender/simulations/bparticles/step_description_interfaces.hpp b/source/blender/simulations/bparticles/step_description_interfaces.hpp
index 56ac35d4763..a0fbdf7cb6f 100644
--- a/source/blender/simulations/bparticles/step_description_interfaces.hpp
+++ b/source/blender/simulations/bparticles/step_description_interfaces.hpp
@@ -71,12 +71,9 @@ class EmitterInterface {
private:
ParticleAllocator &m_particle_allocator;
TimeSpan m_time_span;
- WorldTransition &m_world_transition;
public:
- EmitterInterface(ParticleAllocator &particle_allocator,
- TimeSpan time_span,
- WorldTransition &world_transition);
+ EmitterInterface(ParticleAllocator &particle_allocator, TimeSpan time_span);
~EmitterInterface() = default;
ParticleAllocator &particle_allocator();
@@ -244,11 +241,6 @@ inline bool EmitterInterface::is_first_step()
return m_time_span.start() == 0.0f;
}
-inline WorldTransition &EmitterInterface::world_transition()
-{
- return m_world_transition;
-}
-
/* EventStorage inline functions
****************************************/
More information about the Bf-blender-cvs
mailing list