Moving error message block into if-else.

This commit is contained in:
Patrick Shriwise 2018-10-31 09:05:44 -05:00
parent 66bdf04511
commit cd3b05a3f6

View file

@ -183,17 +183,16 @@ Plot::set_type(pugi::xml_node plot_node)
// set type using node value
if (type_str == "slice") {
type_ = PlotType::slice;
return;
}
else if (type_str == "voxel") {
type_ = PlotType::voxel;
return;
}
} else {
// if we're here, something is wrong
std::stringstream err_msg;
err_msg << "Unsupported plot type '" << type_str
<< "' in plot " << id_;
fatal_error(err_msg.str());
}
}
}