From e354c5c2a856b442e8f141904fc203018d6bb4c1 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 26 Sep 2013 18:25:28 +0200 Subject: IdTable, SongFilter: use std::fill_n() instead of std::fill() --- src/IdTable.hxx | 2 +- src/SongFilter.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/IdTable.hxx b/src/IdTable.hxx index 8925fe8ab..fa93f1f38 100644 --- a/src/IdTable.hxx +++ b/src/IdTable.hxx @@ -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() { diff --git a/src/SongFilter.cxx b/src/SongFilter.cxx index bab81b327..c0404406d 100644 --- a/src/SongFilter.cxx +++ b/src/SongFilter.cxx @@ -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; -- cgit v1.2.3