Skip to content

Commit

Permalink
sixtracklib/common: adds missing handling of m_num_stored_buffers dur…
Browse files Browse the repository at this point in the history
…ing construction and assignment

NOTE: apparently, m_stored_buffers and m_assign_item_keys are not handled during copy-assignment
      operations -> this is not good and should be fixed!
  • Loading branch information
martinschwinzerl committed Oct 28, 2020
1 parent 780c2f0 commit 1066fab
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sixtracklib/common/track/track_job_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1753,6 +1753,7 @@ namespace SIXTRL_CXX_NAMESPACE
m_num_particle_sets_in_buffer( st_size_t{ 0 } ),
m_num_beam_elements_in_buffer( st_size_t{ 0 } ),
m_elem_by_elem_config_index( st_size_t{ 0 } ),
m_num_stored_buffers( st_size_t{ 0 } ),
m_default_elem_by_elem_order( ::NS(ELEM_BY_ELEM_ORDER_DEFAULT) ),
m_total_num_particles( tjob_t::num_particles_t{ 0 } ),
m_total_num_particles_in_sets( tjob_t::num_particles_t{ 0 } ),
Expand Down Expand Up @@ -1798,6 +1799,7 @@ namespace SIXTRL_CXX_NAMESPACE
m_num_particle_sets_in_buffer( other.m_num_particle_sets_in_buffer ),
m_num_beam_elements_in_buffer( other.m_num_beam_elements_in_buffer ),
m_elem_by_elem_config_index( other.m_elem_by_elem_config_index ),
m_num_stored_buffers( other.m_num_stored_buffers ),
m_default_elem_by_elem_order( other.m_default_elem_by_elem_order ),
m_total_num_particles( other.m_total_num_particles ),
m_total_num_particles_in_sets( other.m_total_num_particles_in_sets ),
Expand Down Expand Up @@ -1874,6 +1876,7 @@ namespace SIXTRL_CXX_NAMESPACE
std::move( other.m_num_beam_elements_in_buffer ) ),
m_elem_by_elem_config_index(
std::move( other.m_elem_by_elem_config_index ) ),
m_num_stored_buffers( std::move( other.m_num_stored_buffers ) ),
m_default_elem_by_elem_order(
std::move( other.m_default_elem_by_elem_order ) ),
m_total_num_particles( std::move( other.m_total_num_particles ) ),
Expand Down Expand Up @@ -1993,6 +1996,8 @@ namespace SIXTRL_CXX_NAMESPACE
this->m_elem_by_elem_config_index =
rhs.m_elem_by_elem_config_index;

this->m_num_stored_buffers = rhs.m_num_stored_buffers;

this->m_default_elem_by_elem_order =
rhs.m_default_elem_by_elem_order;

Expand Down

0 comments on commit 1066fab

Please sign in to comment.