Skip to content

Commit 6a5cbd4

Browse files
committed
hotfix for multi-proto sampling functions
1 parent 37d047b commit 6a5cbd4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/MCISamplingFunctionInterface.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@ class MCISamplingFunctionInterface
4040

4141
// Utilities
4242
void newToOld()
43-
{
44-
for(int i=0; i<_nproto; ++i){ double * foo; foo=_protonew; _protonew=_protoold; _protoold=foo; }
43+
{ // pointer swap
44+
double * foo=_protonew;
45+
_protonew=_protoold;
46+
_protoold=foo;
4547
}
4648

4749
void computeNewSamplingFunction(const double * in)

0 commit comments

Comments
 (0)