mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Address /W4 compiler warnings for Windows (#4910)
This commit is contained in:
parent
cb90a8356b
commit
186f4289e9
50 changed files with 279 additions and 272 deletions
|
|
@ -1306,16 +1306,16 @@ Response::ResponseCode AbstractServerSocketInterface::cmdAccountEdit(const Comma
|
|||
QString queryText = QString("update {prefix}_users set %1 where name=:userName").arg(queryList.join(", "));
|
||||
QSqlQuery *query = sqlInterface->prepareQuery(queryText);
|
||||
if (cmd.has_real_name()) {
|
||||
QString realName = nameFromStdString(cmd.real_name());
|
||||
query->bindValue(":realName", realName);
|
||||
auto _realName = nameFromStdString(cmd.real_name());
|
||||
query->bindValue(":realName", _realName);
|
||||
}
|
||||
if (cmd.has_email()) {
|
||||
QString emailAddress = nameFromStdString(cmd.email());
|
||||
query->bindValue(":email", emailAddress);
|
||||
auto _emailAddress = nameFromStdString(cmd.email());
|
||||
query->bindValue(":email", _emailAddress);
|
||||
}
|
||||
if (cmd.has_country()) {
|
||||
QString country = nameFromStdString(cmd.country());
|
||||
query->bindValue(":country", country);
|
||||
auto _country = nameFromStdString(cmd.country());
|
||||
query->bindValue(":country", _country);
|
||||
}
|
||||
query->bindValue(":userName", userName);
|
||||
|
||||
|
|
@ -1752,9 +1752,9 @@ void TcpServerSocketInterface::flushOutputQueue()
|
|||
|
||||
QByteArray buf;
|
||||
#if GOOGLE_PROTOBUF_VERSION > 3001000
|
||||
unsigned int size = item.ByteSizeLong();
|
||||
unsigned int size = static_cast<unsigned int>(item.ByteSizeLong());
|
||||
#else
|
||||
unsigned int size = item.ByteSize();
|
||||
unsigned int size = static_cast<unsigned int>(item.ByteSize());
|
||||
#endif
|
||||
buf.resize(size + 4);
|
||||
item.SerializeToArray(buf.data() + 4, size);
|
||||
|
|
@ -1955,9 +1955,9 @@ void WebsocketServerSocketInterface::flushOutputQueue()
|
|||
|
||||
QByteArray buf;
|
||||
#if GOOGLE_PROTOBUF_VERSION > 3001000
|
||||
unsigned int size = item.ByteSizeLong();
|
||||
unsigned int size = static_cast<unsigned int>(item.ByteSizeLong());
|
||||
#else
|
||||
unsigned int size = item.ByteSize();
|
||||
unsigned int size = static_cast<unsigned int>(item.ByteSize());
|
||||
#endif
|
||||
buf.resize(size);
|
||||
item.SerializeToArray(buf.data(), size);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue