[Scummvm-git-logs] scummvm master -> 5290c1e3d0e9a7d045c218a41a116186a4e78d93

mduggan mgithub at guarana.org
Sun Apr 19 00:10:22 UTC 2020


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:
5290c1e3d0 ULTIMA8: Fix compiler warnings


Commit: 5290c1e3d0e9a7d045c218a41a116186a4e78d93
    https://github.com/scummvm/scummvm/commit/5290c1e3d0e9a7d045c218a41a116186a4e78d93
Author: jepael (jepael at users.noreply.github.com)
Date: 2020-04-19T09:10:19+09:00

Commit Message:
ULTIMA8: Fix compiler warnings

Changed paths:
    engines/ultima/ultima8/filesys/idata_source.h
    engines/ultima/ultima8/filesys/odata_source.h


diff --git a/engines/ultima/ultima8/filesys/idata_source.h b/engines/ultima/ultima8/filesys/idata_source.h
index 0dc29009d6..bf7fd74d04 100644
--- a/engines/ultima/ultima8/filesys/idata_source.h
+++ b/engines/ultima/ultima8/filesys/idata_source.h
@@ -95,8 +95,8 @@ public:
 		return _in->read(b, len);
 	}
 
-	bool seek(int32 pos, int whence = SEEK_SET) override {
-		return _in->seek(pos, whence);
+	bool seek(int32 position, int whence = SEEK_SET) override {
+		return _in->seek(position, whence);
 	}
 
 	int32 size() const override {
@@ -162,12 +162,12 @@ public:
 		return count;
 	}
 
-	bool seek(int32 pos, int whence = SEEK_SET) override {
+	bool seek(int32 position, int whence = SEEK_SET) override {
 		assert(whence == SEEK_SET || whence == SEEK_CUR);
 		if (whence == SEEK_CUR) {
-			_bufPtr += pos;
+			_bufPtr += position;
 		} else if (whence == SEEK_SET) {
-			_bufPtr = _buf + pos;
+			_bufPtr = _buf + position;
 		}
 		return true;
 	}
diff --git a/engines/ultima/ultima8/filesys/odata_source.h b/engines/ultima/ultima8/filesys/odata_source.h
index a616d9a53c..7721ea96b3 100644
--- a/engines/ultima/ultima8/filesys/odata_source.h
+++ b/engines/ultima/ultima8/filesys/odata_source.h
@@ -79,7 +79,7 @@ protected:
 		// Reallocate the buffer
 		if (_loc > _allocated) {
 			// The old pointer position
-			uint32 pos = static_cast<uint32>(_bufPtr - _buf);
+			uint32 position = static_cast<uint32>(_bufPtr - _buf);
 
 			// The new buffer and size (2 times what is needed)
 			_allocated = _loc * 2;
@@ -89,7 +89,7 @@ protected:
 			delete [] _buf;
 
 			_buf = new_buf;
-			_bufPtr = _buf + pos;
+			_bufPtr = _buf + position;
 		}
 
 		// Update size
@@ -120,25 +120,25 @@ public:
 		return len;
 	};
 
-	bool seek(int32 pos, int whence = SEEK_SET) override {
+	bool seek(int32 position, int whence = SEEK_SET) override {
 		assert(whence == SEEK_SET);
 		// No seeking past the end of the buffer
-		if (pos <= static_cast<int32>(_size)) _loc = pos;
+		if (position <= static_cast<int32>(_size)) _loc = position;
 		else _loc = _size;
 
 		_bufPtr = const_cast<unsigned char *>(_buf) + _loc;
 		return true;
 	};
 
-	void skip(int32 pos) override {
+	void skip(int32 position) override {
 		// No seeking past the end
-		if (pos >= 0) {
-			_loc += pos;
+		if (position >= 0) {
+			_loc += position;
 			if (_loc > _size) _loc = _size;
 		}
 		// No seeking past the start
 		else {
-			uint32 invpos = -pos;
+			uint32 invpos = -position;
 			if (invpos > _loc) invpos = _loc;
 			_loc -= invpos;
 		}




More information about the Scummvm-git-logs mailing list