Changeset - r14429:d459d2cbce62
[Not reviewed]
master
0 3 0
rubidium - 14 years ago 2010-02-03 21:45:48
rubidium@openttd.org
(svn r18996) -Fix (r18993, r18994): MSVC 64 bits had somethings to complain about
3 files changed with 5 insertions and 5 deletions:
0 comments (0 inline, 0 general)
src/core/smallvec_type.hpp
Show inline comments
 
@@ -76,15 +76,15 @@ public:
 

	
 
	/**
 
	 * Append an item and return it.
 
	 * @param to_add the number of items to append
 
	 * @return pointer to newly allocated item
 
	 */
 
	FORCEINLINE T *Append(size_t to_add = 1)
 
	FORCEINLINE T *Append(uint to_add = 1)
 
	{
 
		size_t begin = this->items;
 
		uint begin = this->items;
 
		this->items += to_add;
 

	
 
		if (this->items > this->capacity) {
 
			this->capacity = Align(this->items, S);
 
			this->data = ReallocT(this->data, this->capacity);
 
		}
src/network/core/tcp_http.cpp
Show inline comments
 
@@ -32,13 +32,13 @@ NetworkHTTPSocketHandler::NetworkHTTPSoc
 
	recv_length(0),
 
	callback(callback),
 
	data(data),
 
	redirect_depth(depth),
 
	sock(s)
 
{
 
	int bufferSize = strlen(url) + strlen(host) + strlen(_openttd_revision) + (data == NULL ? 0 : strlen(data)) + 128;
 
	size_t bufferSize = strlen(url) + strlen(host) + strlen(_openttd_revision) + (data == NULL ? 0 : strlen(data)) + 128;
 
	char *buffer = AllocaM(char, bufferSize);
 

	
 
	DEBUG(net, 7, "[tcp/http] requesting %s%s", host, url);
 
	if (data != NULL) {
 
		seprintf(buffer, buffer + bufferSize - 1, "POST %s HTTP/1.0\r\nHost: %s\r\nUser-Agent: OpenTTD/%s\r\nContent-Type: text/plain\r\nContent-Length: %d\r\n\r\n%s\r\n", url, host, _openttd_revision, (int)strlen(data), data);
 
	} else {
src/network/network_content.cpp
Show inline comments
 
@@ -508,13 +508,13 @@ void ClientNetworkContentSocketHandler::
 
	/* Ignore any latent data coming from a connection we closed. */
 
	if (this->http_response_index == -2) return;
 

	
 
	if (this->http_response_index == -1) {
 
		if (data != NULL) {
 
			/* Append the rest of the response. */
 
			memcpy(this->http_response.Append(length), data, length);
 
			memcpy(this->http_response.Append((uint)length), data, length);
 
			return;
 
		} else {
 
			/* Make sure the response is properly terminated. */
 
			*this->http_response.Append() = '\0';
 

	
 
			/* And prepare for receiving the rest of the data. */
 
@@ -560,13 +560,13 @@ void ClientNetworkContentSocketHandler::
 
	for (;;) {
 
		char *str = this->http_response.Begin() + this->http_response_index;
 
		char *p = strchr(str, '\n');
 
		check_and_terminate(p);
 

	
 
		/* Update the index for the next one */
 
		this->http_response_index += strlen(str) + 1;
 
		this->http_response_index += (int)strlen(str) + 1;
 

	
 
		/* Read the ID */
 
		p = strchr(str, ',');
 
		check_and_terminate(p);
 
		this->curInfo->id = (ContentID)atoi(str);
 

	
0 comments (0 inline, 0 general)