diff options
author | louiz’ <louiz@louiz.org> | 2017-06-14 10:31:45 +0200 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2017-06-14 10:46:44 +0200 |
commit | 2677ac42e8d2e1cf162fec773a9acb453bef8b9b (patch) | |
tree | 4b51bece4f4dec660e0c48297404a5da51aee4ec /src/database/insert_query.hpp | |
parent | dac19da4c791a6c16cde09e61841fd7f6b6268d2 (diff) | |
download | biboumi-2677ac42e8d2e1cf162fec773a9acb453bef8b9b.tar.gz biboumi-2677ac42e8d2e1cf162fec773a9acb453bef8b9b.tar.bz2 biboumi-2677ac42e8d2e1cf162fec773a9acb453bef8b9b.tar.xz biboumi-2677ac42e8d2e1cf162fec773a9acb453bef8b9b.zip |
Fix compilation (many warnings, and a linkage error) with clang++
Diffstat (limited to 'src/database/insert_query.hpp')
-rw-r--r-- | src/database/insert_query.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/database/insert_query.hpp b/src/database/insert_query.hpp index 1712916..4965fc0 100644 --- a/src/database/insert_query.hpp +++ b/src/database/insert_query.hpp @@ -31,7 +31,7 @@ actual_bind(Statement& statement, std::vector<std::string>&, const std::tuple<T. auto&& column = std::get<Id>(columns); if (column.value != 0) { - if (sqlite3_bind_int64(statement.get(), N + 1, column.value) != SQLITE_OK) + if (sqlite3_bind_int64(statement.get(), N + 1, static_cast<sqlite3_int64>(column.value)) != SQLITE_OK) log_error("Failed to bind ", column.value, " to id."); } else if (sqlite3_bind_null(statement.get(), N + 1) != SQLITE_OK) @@ -110,9 +110,9 @@ struct InsertQuery: public Query typename std::enable_if<N < sizeof...(T), void>::type insert_col_name(const std::tuple<T...>& columns) { - auto value = std::get<N>(columns); + using ColumnType = typename std::remove_reference<decltype(std::get<N>(columns))>::type; - this->body += value.name; + this->body += ColumnType::name; if (N < (sizeof...(T) - 1)) this->body += ", "; |