Skip to content

Commit

Permalink
use std::fill in VectorWithOffset::fill
Browse files Browse the repository at this point in the history
  • Loading branch information
KrisThielemans committed Jun 3, 2024
1 parent 0f29d1e commit 1bd8321
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/include/stir/VectorWithOffset.inl
Original file line number Diff line number Diff line change
Expand Up @@ -567,10 +567,7 @@ void
VectorWithOffset<T>::fill(const T& n)
{
this->check_state();
// TODO use std::fill() if we can use namespaces (to avoid name conflicts)
// std::fill(begin(), end(), n);
for (int i = this->get_min_index(); i <= this->get_max_index(); i++)
num[i] = n;
std::fill(this->begin(), this->end(), n);
this->check_state();
}

Expand Down

0 comments on commit 1bd8321

Please sign in to comment.