mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Reduce code duplication with TallyFilter::type()
This commit is contained in:
parent
f2a5e10c46
commit
9d0c1ff7e2
9 changed files with 53 additions and 81 deletions
|
|
@ -188,9 +188,8 @@ prepare_distribcell()
|
|||
// Find all cells listed in a DistribcellFilter.
|
||||
std::unordered_set<int32_t> distribcells;
|
||||
for (auto* filt : tally_filters) {
|
||||
//TODO: replace this cast
|
||||
auto* distrib_filt = dynamic_cast<DistribcellFilter*>(filt);
|
||||
if (distrib_filt) {
|
||||
if (filt->type() == "distribcell") {
|
||||
auto* distrib_filt = static_cast<DistribcellFilter*>(filt);
|
||||
distribcells.insert(distrib_filt->cell_);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue