Merge branch 'master' into lm_tm_hollowing

This commit is contained in:
Lukas Matena 2020-01-06 12:41:29 +01:00
commit 0551411c48
82 changed files with 2066 additions and 462 deletions

View file

@ -449,7 +449,7 @@ bool loadvector(FILE *pFile, std::vector<std::string> &v)
if (::fread(&len, sizeof(len), 1, pFile) != 1)
return false;
std::string s(" ", len);
if (::fread(const_cast<char*>(s.c_str()), 1, len, pFile) != len)
if (::fread(s.data(), 1, len, pFile) != len)
return false;
v.push_back(std::move(s));
}
@ -471,7 +471,7 @@ bool loadvectornameidx(FILE *pFile, std::vector<T> &v)
if (::fread(&len, sizeof(len), 1, pFile) != 1)
return false;
v[i].name.assign(" ", len);
if (::fread(const_cast<char*>(v[i].name.c_str()), 1, len, pFile) != len)
if (::fread(v[i].name.data(), 1, len, pFile) != len)
return false;
}
return true;