mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-19 18:32:35 +01:00
Codefix: typos in comments and strings
This commit is contained in:
@@ -262,7 +262,7 @@ SOCKET NetworkAddress::Resolve(int family, int socktype, int flags, SocketList *
|
||||
std::copy_n(reinterpret_cast<const std::byte *>(runp->ai_addr), runp->ai_addrlen, reinterpret_cast<std::byte *>(&this->address));
|
||||
#ifdef __EMSCRIPTEN__
|
||||
/* Emscripten doesn't zero sin_zero, but as we compare addresses
|
||||
* to see if they are the same address, we need them to be zero'd.
|
||||
* to see if they are the same address, we need them to be zeroed.
|
||||
* Emscripten is, as far as we know, the only OS not doing this.
|
||||
*
|
||||
* https://github.com/emscripten-core/emscripten/issues/12998
|
||||
|
||||
@@ -159,7 +159,7 @@ void NetworkHTTPRequest::WinHttpCallback(DWORD code, void *info, DWORD length)
|
||||
DWORD size = *(DWORD *)info;
|
||||
|
||||
/* Next step: read the data in a temporary allocated buffer.
|
||||
* The buffer will be free'd by OnReceiveData() in the next step. */
|
||||
* The buffer will be freed by OnReceiveData() in the next step. */
|
||||
char *buffer = size == 0 ? nullptr : new char[size];
|
||||
WinHttpReadData(this->request, buffer, size, 0);
|
||||
} break;
|
||||
@@ -278,7 +278,7 @@ bool NetworkHTTPRequest::Receive()
|
||||
/**
|
||||
* Destructor of the HTTP request.
|
||||
*
|
||||
* Makes sure all handlers are closed, and all memory is free'd.
|
||||
* Makes sure all handlers are closed, and all memory is freed.
|
||||
*/
|
||||
NetworkHTTPRequest::~NetworkHTTPRequest()
|
||||
{
|
||||
|
||||
@@ -42,7 +42,7 @@ NetworkServerGameInfo _network_game_info; ///< Information about our game.
|
||||
|
||||
/**
|
||||
* Get the network version string used by this build.
|
||||
* The returned string is guaranteed to be at most NETWORK_REVISON_LENGTH bytes including '\0' terminator.
|
||||
* The returned string is guaranteed to be at most NETWORK_REVISION_LENGTH bytes including '\0' terminator.
|
||||
*/
|
||||
std::string_view GetNetworkRevisionString()
|
||||
{
|
||||
|
||||
@@ -109,7 +109,7 @@ ServerNetworkAdminSocketHandler::~ServerNetworkAdminSocketHandler()
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the acception of a connection.
|
||||
* Handle the acceptance of a connection.
|
||||
* @param s The socket of the new connection.
|
||||
* @param address The address of the peer.
|
||||
*/
|
||||
|
||||
@@ -1117,7 +1117,7 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::Receive_SERVER_MOVE(Packet &p)
|
||||
ClientID client_id = (ClientID)p.Recv_uint32();
|
||||
CompanyID company_id = (CompanyID)p.Recv_uint8();
|
||||
|
||||
Debug(net, 9, "Client::Receive_SERVER_MOVE(): client_id={}, comapny_id={}", client_id, company_id);
|
||||
Debug(net, 9, "Client::Receive_SERVER_MOVE(): client_id={}, company_id={}", client_id, company_id);
|
||||
|
||||
if (client_id == 0) {
|
||||
/* definitely an invalid client id, debug message and do nothing. */
|
||||
|
||||
@@ -656,7 +656,7 @@ void ClientNetworkCoordinatorSocketHandler::CloseTurnHandler(std::string_view to
|
||||
turn_it->second->CloseSocket();
|
||||
|
||||
/* We don't remove turn_handler here, as we can be called from within that
|
||||
* turn_handler instance, so our object cannot be free'd yet. Instead, we
|
||||
* turn_handler instance, so our object cannot be freed yet. Instead, we
|
||||
* check later if the connection is closed, and free the object then. */
|
||||
}
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ bool X25519DerivedKeys::Exchange(const X25519PublicKey &peer_public_key, X25519K
|
||||
}
|
||||
|
||||
/**
|
||||
* Encryption handler implementation for monocypther encryption after a X25519 key exchange.
|
||||
* Encryption handler implementation for monocypher encryption after a X25519 key exchange.
|
||||
*/
|
||||
class X25519EncryptionHandler : public NetworkEncryptionHandler {
|
||||
private:
|
||||
|
||||
@@ -1428,7 +1428,7 @@ private:
|
||||
}
|
||||
|
||||
/**
|
||||
* Crete new company button is clicked.
|
||||
* Create new company button is clicked.
|
||||
* @param w The instance of this window.
|
||||
* @param pt The point where this button was clicked.
|
||||
*/
|
||||
@@ -1621,7 +1621,7 @@ public:
|
||||
{
|
||||
this->RebuildList();
|
||||
|
||||
/* Currently server information is not sync'd to clients, so we cannot show it on clients. */
|
||||
/* Currently server information is not synced to clients, so we cannot show it on clients. */
|
||||
this->GetWidget<NWidgetStacked>(WID_CL_SERVER_SELECTOR)->SetDisplayedPlane(_network_server ? 0 : SZSP_HORIZONTAL);
|
||||
this->SetWidgetDisabledState(WID_CL_SERVER_NAME_EDIT, !_network_server);
|
||||
}
|
||||
@@ -2065,7 +2065,7 @@ struct NetworkJoinStatusWindow : Window {
|
||||
}
|
||||
[[fallthrough]];
|
||||
|
||||
default: // Waiting is 15%, so the resting receivement of map is maximum 70%
|
||||
default: // Waiting is 15%, so the remaining downloading of the map is maximum 70%
|
||||
progress = 15 + _network_join_bytes * (100 - 15) / _network_join_bytes_total;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user