Address /W4 compiler warnings for Windows (#4910)

This commit is contained in:
Zach H 2023-10-15 20:31:13 -04:00 committed by GitHub
parent cb90a8356b
commit 186f4289e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
50 changed files with 279 additions and 272 deletions

View file

@ -834,9 +834,9 @@ void Servatrice_DatabaseInterface::storeGameInformation(const QString &roomName,
for (int i = 0; i < replayList.size(); ++i) {
QByteArray blob;
#if GOOGLE_PROTOBUF_VERSION > 3001000
const unsigned int size = replayList[i]->ByteSizeLong();
const unsigned int size = static_cast<unsigned int>(replayList[i]->ByteSizeLong());
#else
const unsigned int size = replayList[i]->ByteSize();
const unsigned int size = static_cast<unsigned int>(replayList[i]->ByteSize());
#endif
blob.resize(size);
replayList[i]->SerializeToArray(blob.data(), size);