diff --git a/src/economy.cpp b/src/economy.cpp index 6313b93431..2a70ffd20e 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -1200,7 +1200,7 @@ uint DeliverGoodsToIndustryEqually(const Station *st, CargoID cargo_type, uint n if (num_pieces > 0) { assert(num_pieces < acceptingIndustries.size()); - uint idx = RandomRange(acceptingIndustries.size()); + uint idx = RandomRange((uint)acceptingIndustries.size()); for (uint i = 0; i < acceptingIndustries.size(); ++i) { if (acceptingIndustries[idx].capacity > 0) { distributeCargo(acceptingIndustries[idx], 1); diff --git a/src/saveload/company_sl.cpp b/src/saveload/company_sl.cpp index f35e968237..93234d7c44 100644 --- a/src/saveload/company_sl.cpp +++ b/src/saveload/company_sl.cpp @@ -624,14 +624,14 @@ static void Save_PLYP() } std::vector buffer = SlSaveToVector([](void *) { - SlWriteUint32(_network_company_server_id.size()); + SlWriteUint32((uint32)_network_company_server_id.size()); MemoryDumper::GetCurrent()->CopyBytes((const uint8 *)_network_company_server_id.data(), _network_company_server_id.size()); for (const Company *c : Company::Iterate()) { SlWriteUint16(c->index); const std::string &password = _network_company_states[c->index].password; - SlWriteUint32(password.size()); + SlWriteUint32((uint32)password.size()); MemoryDumper::GetCurrent()->CopyBytes((const uint8 *)password.data(), password.size()); }