add sectorcollection

This commit is contained in:
Ivan Morozov
2022-06-10 15:28:59 +03:00
parent 87c3d6cf9d
commit e049cff2ed
9 changed files with 67 additions and 37 deletions

View File

@ -4,8 +4,8 @@ using namespace CFCPP;
int Sector::MINISECTOR_SIZE = 64;
Sector::Sector(int size, std::unique_ptr<std::fstream> stream) :
size(size), stream(std::move(stream))
Sector::Sector(int size, const Stream &stream) :
size(size), stream(stream)
{}
Sector::Sector(int size, const std::vector<BYTE>& data) :
@ -19,7 +19,7 @@ Sector::Sector(int size) :
bool Sector::IsStreamed()
{
if (stream == nullptr || size == MINISECTOR_SIZE)
if (stream.GetPointer() == nullptr || size == MINISECTOR_SIZE)
return false;
auto currentPossition = stream->tellg();