Skip to content

Commit

Permalink
Simplify single group check.
Browse files Browse the repository at this point in the history
  • Loading branch information
1uc committed Nov 6, 2023
1 parent 8366465 commit 09fa3fc
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/population.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,7 @@ struct Population::Impl {
h5Root.getGroup("0").exist(H5_DYNAMICS_PARAMS)
? _listChildren(h5Root.getGroup("0").getGroup(H5_DYNAMICS_PARAMS))
: std::set<std::string>{}) {
size_t groupID = 0;
while (h5Root.exist(std::to_string(groupID))) {
++groupID;
}
if (groupID != 1) {
if (h5Root.exist("1")) {
throw SonataError("Only single-group populations are supported at the moment");
}
}
Expand Down

0 comments on commit 09fa3fc

Please sign in to comment.