aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-04-27 22:27:28 +0200
committerMax Kellermann <max@duempel.org>2014-04-27 22:27:28 +0200
commit75542e8f5d615c31282e6e8562bb1b71222af999 (patch)
treeb19fc18f80e4bcd967ab15dafc161a916c7f976c
parentfcb55f841ae4772ee94f80eed5b45947ef644337 (diff)
downloadmpd-75542e8f5d615c31282e6e8562bb1b71222af999.tar.gz
mpd-75542e8f5d615c31282e6e8562bb1b71222af999.tar.xz
mpd-75542e8f5d615c31282e6e8562bb1b71222af999.zip
db/Count: add constructor
-rw-r--r--src/db/Count.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/db/Count.cxx b/src/db/Count.cxx
index 4fa1c02a3..8c61e4c21 100644
--- a/src/db/Count.cxx
+++ b/src/db/Count.cxx
@@ -29,6 +29,9 @@
struct SearchStats {
unsigned n_songs;
unsigned long total_time_s;
+
+ constexpr SearchStats()
+ :n_songs(0), total_time_s(0) {}
};
static void
@@ -61,8 +64,6 @@ PrintSongCount(Client &client, const char *name,
const DatabaseSelection selection(name, true, filter);
SearchStats stats;
- stats.n_songs = 0;
- stats.total_time_s = 0;
using namespace std::placeholders;
const auto f = std::bind(stats_visitor_song, std::ref(stats),