Commit 6500a45b authored by Ronan Trépos's avatar Ronan Trépos
Browse files

ParametersSol: allow int to init soil depth

parent 753a3a53
......@@ -68,7 +68,13 @@ struct ParametresSol
void initialiser( const vle::devs::InitEventList& events ){
if ( events.exist("profondeur") ){
profondeur = events.getDouble("profondeur");
if (events.get("profondeur")->isDouble()) {
profondeur = events.getDouble("profondeur");
} else if (events.get("profondeur")->isInteger()){
profondeur = (double) events.getInt("profondeur");
} else {
throw vle::utils::ModellingError("[ParametersSol] wrong 'profondeur'");
}
} else {
throw vle::utils::ModellingError("[ParametersSol] missing 'profondeur'");
}
......
Supports Markdown
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