[Scummvm-git-logs] scummvm master -> 78bd7e7fd5a1be5fb8eba79578cab3e6763a7562

rvanlaar noreply at scummvm.org
Tue Nov 29 21:20:08 UTC 2022


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:
78bd7e7fd5 DIRECTOR: Fix compilation deprecation warning


Commit: 78bd7e7fd5a1be5fb8eba79578cab3e6763a7562
    https://github.com/scummvm/scummvm/commit/78bd7e7fd5a1be5fb8eba79578cab3e6763a7562
Author: Roland van Laar (roland at rolandvanlaar.nl)
Date: 2022-11-29T22:11:02+01:00

Commit Message:
DIRECTOR: Fix compilation deprecation warning

Remove uses of deprected `SeekableSubReadStreamEndian` in archive.cpp

The deprationwarning was:

    Use SeekableReadStreamEndianWrapper with SeekableSubReadStream instead

Changed paths:
    engines/director/archive.cpp


diff --git a/engines/director/archive.cpp b/engines/director/archive.cpp
index 7f091f12ffc..bb22d5b3d3c 100644
--- a/engines/director/archive.cpp
+++ b/engines/director/archive.cpp
@@ -118,8 +118,9 @@ Common::SeekableReadStreamEndian *Archive::getResource(uint32 tag, uint16 id) {
 		error("Archive::getResource(): Archive does not contain '%s' %d", tag2str(tag), id);
 
 	const Resource &res = resMap[id];
+	auto stream = new Common::SeekableSubReadStream(_stream, res.offset, res.offset + res.size, DisposeAfterUse::NO);
 
-	return new Common::SeekableSubReadStreamEndian(_stream, res.offset, res.offset + res.size, _isBigEndian, DisposeAfterUse::NO);
+	return new Common::SeekableReadStreamEndianWrapper(stream, _isBigEndian, DisposeAfterUse::NO);
 }
 
 Resource Archive::getResourceDetail(uint32 tag, uint16 id) {
@@ -460,7 +461,9 @@ Common::SeekableReadStreamEndian *RIFFArchive::getResource(uint32 tag, uint16 id
 	}
 
 	debugC(4, kDebugLoading, "RIFFArchive::getResource() tag: %s id: %i offset: %i size: %i", tag2str(tag), id, res.offset, res.size);
-	return new Common::SeekableSubReadStreamEndian(_stream, _startOffset + offset, _startOffset + offset + size, true, DisposeAfterUse::NO);
+
+	auto stream = new Common::SeekableSubReadStream(_stream, _startOffset + offset, _startOffset + offset + size, DisposeAfterUse::NO);
+	return new Common::SeekableReadStreamEndianWrapper(stream, true, DisposeAfterUse::NO);
 }
 
 // RIFX Archive code
@@ -943,8 +946,9 @@ Common::SeekableReadStreamEndian *RIFXArchive::getResource(uint32 tag, uint16 id
 
 	uint32 offset = res.offset + 8;
 	uint32 size = res.size;
+	auto stream = new Common::SeekableSubReadStream(_stream, offset, offset + size, DisposeAfterUse::NO);
 
-	return new Common::SeekableSubReadStreamEndian(_stream, offset, offset + size, bigEndian, DisposeAfterUse::NO);
+	return new Common::SeekableReadStreamEndianWrapper(stream, bigEndian, DisposeAfterUse::NO);
 }
 
 Resource RIFXArchive::getResourceDetail(uint32 tag, uint16 id) {




More information about the Scummvm-git-logs mailing list