IdTable, SongFilter: use std::fill_n() instead of std::fill()
This commit is contained in:
parent
04bc9005ae
commit
e354c5c2a8
@ -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() {
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user