Continue work on png writer.
This commit is contained in:
parent
9c8faa534b
commit
86bc0d89f6
19 changed files with 225 additions and 19 deletions
|
@ -32,9 +32,23 @@ std::ofstream* File::GetOutHandle() const
|
|||
return mOutHandle.get();
|
||||
}
|
||||
|
||||
unsigned char File::readNextByte()
|
||||
std::optional<unsigned char> File::readNextByte()
|
||||
{
|
||||
return mInHandle->get();
|
||||
if (mInHandle->good())
|
||||
{
|
||||
if (auto val = mInHandle->get(); val == EOF)
|
||||
{
|
||||
return std::nullopt;
|
||||
}
|
||||
else
|
||||
{
|
||||
return val;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return std::nullopt;
|
||||
}
|
||||
}
|
||||
|
||||
void File::Open(bool asBinary)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue