Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use reference instead of pointer
  • Loading branch information
makdl committed Mar 22, 2021
commit b9130e239bbd9c6945fb38fd6ec94a4fd35c3161
4 changes: 2 additions & 2 deletions spatialpy/ssa_sdpd-c-simulation-engine/src/simulate_rdme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ namespace Spatialpy{
double totrate,cum,rdelta,rrdelta;
int event,errcode = 0;
long unsigned int re, spec = 0 ;
Particle *subvol;
Particle& subvol;
int subvol_index;
size_t i,j = 0;
//double old_rrate = 0.0,old_drate = 0.0;
Expand Down Expand Up @@ -580,7 +580,7 @@ namespace Spatialpy{
timeRxnPair = system->rdme_event_q.selectReaction();
tt = timeRxnPair.first;
subvol_index = timeRxnPair.second;
subvol = &system->particles[subvol_index];
subvol = system->particles[subvol_index];
vol = (subvol->mass / subvol->rho);

if(debug_flag){printf("nsm: tt=%e subvol=%i\n",tt,subvol->id);}
Expand Down