mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-12-25 15:03:34 +00:00
d8476b7325
End of optimizations for now going faster
18 lines
322 B
C++
18 lines
322 B
C++
#include "BinaryIO.h"
|
|
#include <string>
|
|
|
|
//For reading null-terminated strings
|
|
std::string BinaryIO::ReadString(std::istream& instream) {
|
|
std::string toReturn;
|
|
char buffer;
|
|
|
|
BinaryIO::BinaryRead(instream, buffer);
|
|
|
|
while (buffer != 0x00) {
|
|
toReturn += buffer;
|
|
BinaryRead(instream, buffer);
|
|
}
|
|
|
|
return toReturn;
|
|
}
|