COMMON: Remove hasDataFork and getDataFork

This commit is contained in:
Vladimir Serbinenko 2022-12-04 22:47:19 +01:00 committed by Eugene Sandulenko
parent ae9de1acbc
commit 382913b51d
2 changed files with 0 additions and 34 deletions

View file

@ -135,10 +135,6 @@ void MacResManager::close() {
_resMap.numTypes = 0;
}
bool MacResManager::hasDataFork() const {
return !_baseFileName.empty();
}
bool MacResManager::hasResFork() const {
return !_baseFileName.empty() && _mode != kResForkNone && _resForkSize != 0;
}
@ -685,24 +681,6 @@ bool MacResManager::load(SeekableReadStream *stream) {
return true;
}
SeekableReadStream *MacResManager::getDataFork() {
if (!_stream)
return nullptr;
if (_mode == kResForkMacBinary) {
_stream->seek(MBI_DFLEN);
uint32 dataSize = _stream->readUint32BE();
return new SafeSeekableSubReadStream(_stream, MBI_INFOHDR, MBI_INFOHDR + dataSize);
}
File *file = new File();
if (file->open(_baseFileName))
return file;
delete file;
return nullptr;
}
MacResIDArray MacResManager::getResIDArray(uint32 typeID) {
int typeNum = -1;
MacResIDArray res;

View file

@ -194,12 +194,6 @@ public:
*/
void close();
/**
* Query whether or not we have a data fork present.
* @return True if the data fork is present
*/
bool hasDataFork() const;
/**
* Query whether or not we have a data fork present.
* @return True if the resource fork is present
@ -230,12 +224,6 @@ public:
*/
SeekableReadStream *getResource(uint32 typeID, const String &filename);
/**
* Retrieve the data fork
* @return The stream if present, 0 otherwise
*/
SeekableReadStream *getDataFork();
static int getDataForkOffset() { return MBI_INFOHDR; }
/**