From 60620d9af5234e15d8267745cb7c9c9a1888d3d8 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 2 Sep 2018 07:58:47 +0200 Subject: [PATCH] db/Print: move variable `i` --- src/db/DatabasePrint.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/db/DatabasePrint.cxx b/src/db/DatabasePrint.cxx index 2d923c618..018f3f126 100644 --- a/src/db/DatabasePrint.cxx +++ b/src/db/DatabasePrint.cxx @@ -185,8 +185,6 @@ db_selection_print(Response &r, Partition &partition, { const Database &db = partition.GetDatabaseOrThrow(); - unsigned i = 0; - using namespace std::placeholders; const auto d = selection.filter == nullptr ? std::bind(full ? PrintDirectoryFull : PrintDirectoryBrief, @@ -200,6 +198,7 @@ db_selection_print(Response &r, Partition &partition, : VisitPlaylist(); if (sort == TAG_NUM_OF_ITEM_TYPES) { + unsigned i = 0; if (!window.IsAll()) s = [s, window, &i](const LightSong &song){ if (window.Contains(i++))