whitespace cleanup

This commit is contained in:
Kevin Matz 2023-05-18 14:32:33 -04:00
parent bd15cbd5aa
commit 999026abb7
2 changed files with 52 additions and 52 deletions

View File

@ -355,15 +355,15 @@ bufferstream& bufferstream::operator<< (const streamable& obj)
*/
void bufferstream::readString(std::string &str, const int fixed_length, const bool terminated)
{
if (fixed_length) // fixed length
if (fixed_length) // FIXED LENGTH
{
uint8_t buffer[fixed_length];
read(buffer, fixed_length);
if (gcount() != fixed_length)
return setstate(std::ios_base::failbit);
str += std::string(reinterpret_cast<char*>(buffer));
}
else // variable length
} // end FIXED LENGTH
else // VARIABLE LENGTH
{
if (terminated) // null terminated
{
@ -381,7 +381,7 @@ void bufferstream::readString(std::string &str, const int fixed_length, const bo
str += std::string(reinterpret_cast<char*>(data()), available());
setstate(std::ios_base::eofbit);
}
}
} // end VARIABLE LENGTH
}