Commit 75542e8f authored by Max Kellermann's avatar Max Kellermann

db/Count: add constructor

parent fcb55f84
...@@ -29,6 +29,9 @@ ...@@ -29,6 +29,9 @@
struct SearchStats { struct SearchStats {
unsigned n_songs; unsigned n_songs;
unsigned long total_time_s; unsigned long total_time_s;
constexpr SearchStats()
:n_songs(0), total_time_s(0) {}
}; };
static void static void
...@@ -61,8 +64,6 @@ PrintSongCount(Client &client, const char *name, ...@@ -61,8 +64,6 @@ PrintSongCount(Client &client, const char *name,
const DatabaseSelection selection(name, true, filter); const DatabaseSelection selection(name, true, filter);
SearchStats stats; SearchStats stats;
stats.n_songs = 0;
stats.total_time_s = 0;
using namespace std::placeholders; using namespace std::placeholders;
const auto f = std::bind(stats_visitor_song, std::ref(stats), const auto f = std::bind(stats_visitor_song, std::ref(stats),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment