~singpolyma/biboumi

9bf81a2c04eddabd0f09ea9157e6e7c97bea88f5 — louiz’ 6 years ago 6e7ee32
This should fix the int conversion warning on 32bits arch
3 files changed, 4 insertions(+), 3 deletions(-)

M src/database/query.cpp
M src/database/query.hpp
M src/database/row.hpp
M src/database/query.cpp => src/database/query.cpp +1 -1
@@ 6,7 6,7 @@ void actual_bind(Statement& statement, const std::string& value, int index)
  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);
}

M src/database/query.hpp => src/database/query.hpp +1 -1
@@ 12,7 12,7 @@
#include <string>

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);

#ifdef DEBUG_SQL_QUERIES

M src/database/row.hpp => src/database/row.hpp +2 -1
@@ 42,7 42,8 @@ struct Row
    if (id.value == Id::unset_value)
      {
        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
      this->update(*db);