This should fix the int conversion warning on 32bits arch

This commit is contained in:
louiz’
2018-01-28 14:10:14 +01:00
parent 6e7ee320bc
commit 9bf81a2c04
3 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ void actual_bind(Statement& statement, const std::string& value, int index)
statement.bind_text(index, value); statement.bind_text(index, value);
} }
void actual_bind(Statement& statement, const std::size_t value, int index) void actual_bind(Statement& statement, const std::int64_t value, int index)
{ {
statement.bind_int64(index, value); statement.bind_int64(index, value);
} }
+1 -1
View File
@@ -12,7 +12,7 @@
#include <string> #include <string>
void actual_bind(Statement& statement, const std::string& value, int index); void actual_bind(Statement& statement, const std::string& value, int index);
void actual_bind(Statement& statement, const std::size_t value, int index); void actual_bind(Statement& statement, const std::int64_t value, int index);
void actual_bind(Statement& statement, const OptionalBool& value, int index); void actual_bind(Statement& statement, const OptionalBool& value, int index);
#ifdef DEBUG_SQL_QUERIES #ifdef DEBUG_SQL_QUERIES
+2 -1
View File
@@ -42,7 +42,8 @@ struct Row
if (id.value == Id::unset_value) if (id.value == Id::unset_value)
{ {
this->insert(*db); this->insert(*db);
std::get<Id>(this->columns).value = db->last_inserted_rowid; if (db->last_inserted_rowid >= 0)
std::get<Id>(this->columns).value = static_cast<Id::real_type>(db->last_inserted_rowid);
} }
else else
this->update(*db); this->update(*db);