forked from OpenGamers/abaddon
try to fix some more compilation errors/warnings
This commit is contained in:
parent
2c2686946d
commit
d950460e14
@ -261,7 +261,7 @@ void Store::SetGuildMember(Snowflake guild_id, Snowflake user_id, const GuildMem
|
||||
s->Bind(9, data.IsPending);
|
||||
|
||||
if (!s->Insert())
|
||||
fprintf(stderr, "member insert failed for %" PRIu64 "/% " PRIu64 ": %s\n", static_cast<uint64_t>(user_id), static_cast<uint64_t>(guild_id), m_db.ErrStr());
|
||||
fprintf(stderr, "member insert failed for %" PRIu64 "/%" PRIu64 ": %s\n", static_cast<uint64_t>(user_id), static_cast<uint64_t>(guild_id), m_db.ErrStr());
|
||||
|
||||
s->Reset();
|
||||
|
||||
@ -661,7 +661,7 @@ std::optional<ChannelData> Store::GetChannel(Snowflake id) const {
|
||||
s->Get(0, r);
|
||||
}
|
||||
s->Reset();
|
||||
if (recipients.size() > 0)
|
||||
if (!recipients.empty())
|
||||
r.RecipientIDs = std::move(recipients);
|
||||
}
|
||||
|
||||
@ -2173,6 +2173,10 @@ int Store::Statement::Bind(int index, size_t num) {
|
||||
return m_db->SetError(sqlite3_bind_int64(m_stmt, index, num));
|
||||
}
|
||||
|
||||
int Store::Statement::Bind(int index, Snowflake id) {
|
||||
return m_db->SetError(sqlite3_bind_int64(m_stmt, index, static_cast<sqlite3_int64>(id)));
|
||||
}
|
||||
|
||||
int Store::Statement::Bind(int index, const char *str, size_t len) {
|
||||
if (len == -1) len = strlen(str);
|
||||
return m_db->SetError(sqlite3_bind_blob(m_stmt, index, str, len, SQLITE_TRANSIENT));
|
||||
|
@ -103,6 +103,7 @@ private:
|
||||
int Bind(int index, int32_t num);
|
||||
int Bind(int index, uint32_t num);
|
||||
int Bind(int index, size_t num);
|
||||
int Bind(int index, Snowflake id);
|
||||
int Bind(int index, const char *str, size_t len = -1);
|
||||
int Bind(int index, const std::string &str);
|
||||
int Bind(int index, bool val);
|
||||
|
Loading…
Reference in New Issue
Block a user