Revision 08285dff src/sim/ccomponent.cc

View differences:

src/sim/ccomponent.cc
736 736
*/
737 737
}
738 738

  
739
cRNG* cComponent::getRNG(int k) const
740
{
741
	const cModule* const thisMod=dynamic_cast<const cModule* const>(this);
742
	int modId=0;
743
	if(thisMod) modId=thisMod->getId();
744
	k+=modId*ev.getNumRNGsPerModule();
745
	return ev.getRNG(k);
746
}
747

  

Also available in: Unified diff