Commit d3ba9a44 authored by Enrico Bothmann's avatar Enrico Bothmann

Remove exception when multiplying empty var wgts

"Empty" here means that no variation was specified. Also, the exception was
only thrown when the variation weights were not properly initialised before,
too. This was only the case when PHASIC SingleProcess::Differential was not
called, e.g. when using a custom Process plug-in.
parent 3a4bdff8
......@@ -655,6 +655,9 @@ void Variation_Weights::Reset()
Variation_Weights & Variation_Weights::operator*=(const double &scalefactor)
{
if (GetNumberOfVariations() == 0) {
return *this;
}
if (!m_initialised) {
THROW(fatal_error, "Can not multiply uninitialised variation weights.");
}
......@@ -668,6 +671,9 @@ Variation_Weights & Variation_Weights::operator*=(const double &scalefactor)
Variation_Weights & Variation_Weights::operator*=(const Variation_Weights &other)
{
if (GetNumberOfVariations() == 0) {
return *this;
}
if (!m_initialised) {
THROW(fatal_error, "Can not multiply uninitialised variation weights.");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment