diff options
author | John Wiegley <johnw@newartisans.com> | 2009-10-31 00:43:16 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-10-31 00:43:16 -0400 |
commit | a88a4c55b2b11d58d3b9e49bf785be42afe63510 (patch) | |
tree | 1c03e9eb6f649a1446021dfb2a5d93a697f81feb /src/error.cc | |
parent | 36a01d82f9b2d700604345f42225ae8be16ecea8 (diff) | |
download | fork-ledger-a88a4c55b2b11d58d3b9e49bf785be42afe63510.tar.gz fork-ledger-a88a4c55b2b11d58d3b9e49bf785be42afe63510.tar.bz2 fork-ledger-a88a4c55b2b11d58d3b9e49bf785be42afe63510.zip |
Added a few more missing casts
Diffstat (limited to 'src/error.cc')
-rw-r--r-- | src/error.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/error.cc b/src/error.cc index 63b9885c..d5abe4de 100644 --- a/src/error.cc +++ b/src/error.cc @@ -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"); |