Fix for enumeration values not explicitly handled in switch statements

This commit is contained in:
Simon Richards 2020-02-28 22:35:23 +00:00
parent 200bb92b9e
commit 670d7d0e22
5 changed files with 12 additions and 0 deletions

View file

@ -295,6 +295,8 @@ std::vector<VolumeCalculation::Result> VolumeCalculation::execute() const
case TriggerMetric::variance:
val = result.volume[1] * result.volume[1];
break;
default:
break;
}
// update max if entry is valid
if (val > 0.0) { trigger_val = std::max(trigger_val, val); }
@ -374,6 +376,8 @@ void VolumeCalculation::to_hdf5(const std::string& filename,
case TriggerMetric::relative_error:
trigger_str = "rel_err";
break;
default:
break;
}
write_attribute(file_id, "trigger_type", trigger_str);
} else {