Skip to content

Commit

Permalink
compilers
Browse files Browse the repository at this point in the history
  • Loading branch information
EmosewaMC committed Dec 24, 2024
1 parent b3f22ce commit 6c1236a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions dCommon/BinaryIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,26 @@

//For reading null-terminated strings
template<typename StringType>
StringType BinaryIO::ReadString(std::istream& instream) {
StringType toReturn;
typename StringType::value_type buffer;
StringType ReadString(std::istream& instream) {
StringType toReturn{};
typename StringType::value_type buffer{};

BinaryIO::BinaryRead(instream, buffer);

while (buffer != 0x00) {
toReturn += buffer;
BinaryRead(instream, buffer);
BinaryIO::BinaryRead(instream, buffer);
}

return toReturn;
}

//For reading null-terminated strings
std::string BinaryIO::ReadString(std::istream& instream) {
return ReadString<std::string>(instream);
return ::ReadString<std::string>(instream);
}

//For reading null-terminated strings
std::u8string BinaryIO::ReadU8String(std::istream& instream) {
return ReadString<std::u8string>(instream);
return ::ReadString<std::u8string>(instream);
}

0 comments on commit 6c1236a

Please sign in to comment.