MCPcopy Create free account
hub / github.com/TheRealMJP/Shadows / SerializeReadString

Function SerializeReadString

Shadows/SampleFramework11/Serialization.h:67–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67template<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}

Callers 1

ReadFromFileMethod · 0.85

Calls 1

Win32CallFunction · 0.85

Tested by

no test coverage detected