[Scummvm-git-logs] scummvm master -> 1bdeff2d562ca76bf4dd1ac5b0f97157e6570427

digitall dgturner at iee.org
Tue Jan 10 05:08:24 CET 2017


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
1bdeff2d56 CLOUD: Fix Two Variable Shadowing Compiler Warnings.


Commit: 1bdeff2d562ca76bf4dd1ac5b0f97157e6570427
    https://github.com/scummvm/scummvm/commit/1bdeff2d562ca76bf4dd1ac5b0f97157e6570427
Author: D G Turner (digitall at scummvm.org)
Date: 2017-01-10T04:14:28Z

Commit Message:
CLOUD: Fix Two Variable Shadowing Compiler Warnings.

Changed paths:
    backends/networking/curl/networkreadstream.cpp
    backends/networking/curl/networkreadstream.h


diff --git a/backends/networking/curl/networkreadstream.cpp b/backends/networking/curl/networkreadstream.cpp
index b451670..4da18ce 100644
--- a/backends/networking/curl/networkreadstream.cpp
+++ b/backends/networking/curl/networkreadstream.cpp
@@ -228,19 +228,19 @@ Common::String NetworkReadStream::responseHeaders() const {
 }
 
 uint32 NetworkReadStream::fillWithSendingContents(char *bufferToFill, uint32 maxSize) {
-	uint32 size = _sendingContentsSize - _sendingContentsPos;
-	if (size > maxSize)
-		size = maxSize;
-	for (uint32 i = 0; i < size; ++i) {
+	uint32 sendSize = _sendingContentsSize - _sendingContentsPos;
+	if (sendSize > maxSize)
+		sendSize = maxSize;
+	for (uint32 i = 0; i < sendSize; ++i) {
 		bufferToFill[i] = _sendingContentsBuffer[_sendingContentsPos + i];
 	}
-	_sendingContentsPos += size;
-	return size;
+	_sendingContentsPos += sendSize;
+	return sendSize;
 }
 
-uint32 NetworkReadStream::addResponseHeaders(char *buffer, uint32 size) {
-	_responseHeaders += Common::String(buffer, size);
-	return size;
+uint32 NetworkReadStream::addResponseHeaders(char *buffer, uint32 bufferSize) {
+	_responseHeaders += Common::String(buffer, bufferSize);
+	return bufferSize;
 }
 
 double NetworkReadStream::getProgress() const {
diff --git a/backends/networking/curl/networkreadstream.h b/backends/networking/curl/networkreadstream.h
index 62a3e41..275d8db 100644
--- a/backends/networking/curl/networkreadstream.h
+++ b/backends/networking/curl/networkreadstream.h
@@ -128,7 +128,7 @@ public:
 	*
 	* @returns how many bytes were actually read
 	*/
-	uint32 addResponseHeaders(char *buffer, uint32 size);
+	uint32 addResponseHeaders(char *buffer, uint32 bufferSize);
 
 	/** Returns a number in range [0, 1], where 1 is "complete". */
 	double getProgress() const;





More information about the Scummvm-git-logs mailing list