summaryrefslogtreecommitdiff
path: root/src/sticker
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2019-08-03 13:10:49 +0200
committerMax Kellermann <max@musicpd.org>2019-08-03 13:10:49 +0200
commitcde6c46d2fff083166c3aca7fbf07df737c07cdc (patch)
tree51c5706d03b6ea61fa6dad6566dfa67bc090efda /src/sticker
parentd305f187d5268a040aca6df62849c33b05308963 (diff)
util/Macros: replace with std::size() (C++17)
Diffstat (limited to 'src/sticker')
-rw-r--r--src/sticker/Database.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/sticker/Database.cxx b/src/sticker/Database.cxx
index c90cbdcf7..29df8ca8e 100644
--- a/src/sticker/Database.cxx
+++ b/src/sticker/Database.cxx
@@ -22,10 +22,11 @@
#include "lib/sqlite/Util.hxx"
#include "fs/Path.hxx"
#include "Idle.hxx"
-#include "util/Macros.hxx"
#include "util/StringCompare.hxx"
#include "util/ScopeExit.hxx"
+#include <iterator>
+
#include <assert.h>
using namespace Sqlite;
@@ -98,7 +99,7 @@ StickerDatabase::StickerDatabase(Path path)
/* prepare the statements we're going to use */
- for (unsigned i = 0; i < ARRAY_SIZE(sticker_sql); ++i) {
+ for (unsigned i = 0; i < std::size(sticker_sql); ++i) {
assert(sticker_sql[i] != nullptr);
stmt[i] = Prepare(db, sticker_sql[i]);
@@ -109,7 +110,7 @@ StickerDatabase::~StickerDatabase() noexcept
{
assert(db != nullptr);
- for (unsigned i = 0; i < ARRAY_SIZE(stmt); ++i) {
+ for (unsigned i = 0; i < std::size(stmt); ++i) {
assert(stmt[i] != nullptr);
sqlite3_finalize(stmt[i]);