From d6f34eda997ef5ace7078ac6d944ac505bb2a35d Mon Sep 17 00:00:00 2001 From: Walter van Niftrik Date: Sun, 3 Apr 2016 09:18:04 +0200 Subject: ADL: Remove DataBlockPtr::isValid() --- engines/adl/hires2.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'engines/adl/hires2.cpp') diff --git a/engines/adl/hires2.cpp b/engines/adl/hires2.cpp index 4ac8e88fa0..70b98b9a06 100644 --- a/engines/adl/hires2.cpp +++ b/engines/adl/hires2.cpp @@ -42,6 +42,9 @@ DataBlockPtr HiRes2Engine::readDataBlockPtr(Common::ReadStream &f) const { if (f.eos() || f.err()) error("Error reading DataBlockPtr"); + if (track == 0 && sector == 0 && offset == 0 && size == 0) + return DataBlockPtr(); + return _disk.getDataBlock(track, sector, offset, size); } @@ -70,7 +73,7 @@ void HiRes2Engine::init() { for (uint i = 0; i < IDI_HR2_NUM_MESSAGES; ++i) { DataBlockPtr str(readDataBlockPtr(*stream)); - if (str->isValid()) { + if (str) { StreamPtr strStream(str->createReadStream()); _messages.push_back(readString(*strStream, 0xff)); } else { -- cgit v1.2.3