Make Source::sample() method const

This commit is contained in:
Paul Romano 2020-10-26 17:00:26 -05:00
parent b271399f63
commit 9af5541e88
7 changed files with 12 additions and 12 deletions

View file

@ -196,7 +196,7 @@ below.
class CustomSource : public openmc::Source
{
openmc::Particle::Bank sample(uint64_t* seed)
openmc::Particle::Bank sample(uint64_t* seed) const
{
openmc::Particle::Bank particle;
// weight
@ -271,7 +271,7 @@ the source class when it is created:
CustomSource(double energy) : energy_{energy} { }
// Samples from an instance of this class.
openmc::Particle::Bank sample(uint64_t* seed)
openmc::Particle::Bank sample(uint64_t* seed) const
{
openmc::Particle::Bank particle;
// weight