aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-09-26 18:25:28 +0200
committerMax Kellermann <max@duempel.org>2013-09-26 18:25:28 +0200
commite354c5c2a856b442e8f141904fc203018d6bb4c1 (patch)
tree62b117d9576e63bbbd2dd75d72747395fc2c8ff9 /src
parent04bc9005aeeebc7b1af90f74c4873b3a835d67ac (diff)
downloadmpd-e354c5c2a856b442e8f141904fc203018d6bb4c1.tar.gz
mpd-e354c5c2a856b442e8f141904fc203018d6bb4c1.tar.xz
mpd-e354c5c2a856b442e8f141904fc203018d6bb4c1.zip
IdTable, SongFilter: use std::fill_n() instead of std::fill()
Diffstat (limited to 'src')
-rw-r--r--src/IdTable.hxx2
-rw-r--r--src/SongFilter.cxx2
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;