fix by revier comments

This commit is contained in:
Tomonobu Saito
2019-11-06 11:06:29 +09:00
parent 9c1c842b79
commit fd0f1b60bb
2 changed files with 9 additions and 14 deletions
Regular → Executable
+2 -6
View File
@@ -80,12 +80,8 @@ class FileReader
{
if (0 < count)
{
const auto &ios =
input_stream.getline(reinterpret_cast<char *>(dest), count * sizeof(T));
for (std::size_t n = ios.gcount(); n < count; ++n)
{
reinterpret_cast<char *>(dest)[n] = '\0';
}
memset(dest, 0, count * sizeof(T));
input_stream.getline(reinterpret_cast<char *>(dest), count * sizeof(T));
}
}