whitespace cleanup
This commit is contained in:
parent
bd15cbd5aa
commit
999026abb7
@ -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
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user