IdTable, SongFilter: use std::fill_n() instead of std::fill()

This commit is contained in:
Max Kellermann 2013-09-26 18:25:28 +02:00
parent 04bc9005ae
commit e354c5c2a8
2 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ class IdTable {
public:
IdTable(unsigned _size):size(_size), next(1), data(new int[size]) {
std::fill(data, data + size, -1);
std::fill_n(data, size, -1);
}
~IdTable() {

View File

@ -85,7 +85,7 @@ bool
SongFilter::Item::Match(const Tag &_tag) const
{
bool visited_types[TAG_NUM_OF_ITEM_TYPES];
std::fill(visited_types, visited_types + TAG_NUM_OF_ITEM_TYPES, false);
std::fill_n(visited_types, TAG_NUM_OF_ITEM_TYPES, false);
for (unsigned i = 0; i < _tag.num_items; i++) {
visited_types[_tag.items[i]->type] = true;