1
0
mirror of https://github.com/borgesdan/xn65 synced 2024-12-29 21:54:47 +01:00

Remove ReadChar8

This commit is contained in:
Danilo Borges Santos 2024-12-12 09:28:40 -03:00
parent 64323cb675
commit d628c6b5c3
2 changed files with 4 additions and 16 deletions

View File

@ -57,8 +57,7 @@ namespace csharp {
return InternalReadByte() != 0;
}
virtual char ReadChar();
virtual char ReadChar8();
virtual char ReadChar(bool twoBytesPerChar = false);
virtual int16_t ReadInt16() {
return ReadNumeric<int16_t>();

View File

@ -82,8 +82,8 @@ namespace csharp {
return static_cast<uint8_t>(b);
}
char BinaryReader::ReadChar() {
const auto value = Read();
char BinaryReader::ReadChar(bool twoBytes = false) {
const auto value = Read(twoBytes);
if (value == -1)
{
@ -91,18 +91,7 @@ namespace csharp {
}
return static_cast<char>(value);
}
char BinaryReader::ReadChar8() {
const auto value = Read(true);
if (value == -1)
{
throw EndOfStreamException(SR::IO_EOF_ReadBeyondEOF);
}
return static_cast<char>(value);
}
}
void BinaryReader::InternalRead(std::vector<uint8_t>& buffer) {
if (_disposed)