diff options
Diffstat (limited to 'lib/input')
-rw-r--r-- | lib/input/mysqlBindings.h | 3 | ||||
-rw-r--r-- | lib/input/mysqlStmt.cpp | 2 | ||||
-rw-r--r-- | lib/input/mysqlStmt.h | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/lib/input/mysqlBindings.h b/lib/input/mysqlBindings.h index 84a2d28..ccf876e 100644 --- a/lib/input/mysqlBindings.h +++ b/lib/input/mysqlBindings.h @@ -17,8 +17,7 @@ namespace MyGrate::Input { }; struct Bindings { - // NOLINTNEXTLINE(hicpp-explicit-conversions) - explicit Bindings(const std::initializer_list<DbValue> & vs) + explicit Bindings(const std::span<const DbValue> vs) { binds.reserve(vs.size()); data.reserve(vs.size()); diff --git a/lib/input/mysqlStmt.cpp b/lib/input/mysqlStmt.cpp index e0f4cbc..0a80258 100644 --- a/lib/input/mysqlStmt.cpp +++ b/lib/input/mysqlStmt.cpp @@ -15,7 +15,7 @@ namespace MyGrate::Input { } void - MySQLPrepStmt::execute(const std::initializer_list<DbValue> & vs) + MySQLPrepStmt::execute(const std::span<const DbValue> vs) { Bindings b {vs}; verify<std::logic_error>(!mysql_stmt_bind_param(stmt.get(), b.binds.data()), "Param count mismatch"); diff --git a/lib/input/mysqlStmt.h b/lib/input/mysqlStmt.h index 09b5c73..4a4ad8f 100644 --- a/lib/input/mysqlStmt.h +++ b/lib/input/mysqlStmt.h @@ -17,7 +17,7 @@ namespace MyGrate::Input { class MySQLPrepStmt : public DbPrepStmt { public: MySQLPrepStmt(const char * const q, MYSQL * c); - void execute(const std::initializer_list<DbValue> & vs) override; + void execute(const std::span<const DbValue> vs) override; std::size_t rows() const override; |