Added a few more missing casts

This commit is contained in:
John Wiegley 2009-10-31 00:43:16 -04:00
parent 36a01d82f9
commit a88a4c55b2

View file

@ -96,10 +96,10 @@ string source_context(const path& file,
ifstream in(file);
in.seekg(pos, std::ios::beg);
scoped_array<char> buf(new char[len + 1]);
scoped_array<char> buf(new char[static_cast<std::size_t>(len) + 1]);
in.read(buf.get(), static_cast<std::streamsize>(len));
assert(in.gcount() == len);
buf[len] = '\0';
assert(in.gcount() == static_cast<std::streamsize>(len));
buf[static_cast<std::size_t>(len)] = '\0';
bool first = true;
for (char * p = std::strtok(buf.get(), "\n");