| 65 | } |
| 66 | |
| 67 | template<typename T> void SerializeReadString(HANDLE fileHandle, std::basic_string<T>& str) |
| 68 | { |
| 69 | DWORD bytesRead = 0; |
| 70 | uint32 numChars = 0; |
| 71 | Win32Call(ReadFile(fileHandle, &numChars, sizeof(uint32), &bytesRead, NULL)); |
| 72 | |
| 73 | str.clear(); |
| 74 | if(numChars > 0) |
| 75 | { |
| 76 | str.resize(numChars + 1, 0); |
| 77 | Win32Call(ReadFile(fileHandle, &str[0], sizeof(T) * numChars, &bytesRead, NULL)); |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | } |
no test coverage detected