| 54 | |
| 55 | |
| 56 | std::string BinaryReader::ReadString() |
| 57 | { |
| 58 | if (m_pReader == nullptr) |
| 59 | { |
| 60 | LOG("BinaryReader doesn't exist! Unable to read binary data...", Warning); |
| 61 | return ""; |
| 62 | } |
| 63 | |
| 64 | int32 stringLength = (int32)Read<uint8>(); |
| 65 | |
| 66 | std::stringstream ss; |
| 67 | for (int32 i = 0; i<stringLength; ++i) |
| 68 | { |
| 69 | ss << Read<uint8>(); |
| 70 | } |
| 71 | |
| 72 | return (std::string)ss.str(); |
| 73 | } |
| 74 | |
| 75 | void BinaryReader::Open( const std::vector<uint8> &binaryContent, uint32 start, uint32 count ) |
| 76 | { |