diff options
author | Max Kellermann <max@duempel.org> | 2014-04-27 22:27:28 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-04-27 22:27:28 +0200 |
commit | 75542e8f5d615c31282e6e8562bb1b71222af999 (patch) | |
tree | b19fc18f80e4bcd967ab15dafc161a916c7f976c /src/db/Count.cxx | |
parent | fcb55f841ae4772ee94f80eed5b45947ef644337 (diff) |
db/Count: add constructor
Diffstat (limited to 'src/db/Count.cxx')
-rw-r--r-- | src/db/Count.cxx | 5 |
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), |