Browse Source

sys: use progressively larger temporary buffers when reading files.

legacy
Sam Hocevar sam 11 years ago
parent
commit
526feb9b80
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      src/sys/file.cpp

+ 1
- 2
src/sys/file.cpp View File

@@ -84,8 +84,7 @@ class FileData
ret.Resize(oldsize + done);
memcpy(&ret[oldsize], &buf[0], done);

/* XXX: we could resize the buffer here
* buf.Resize(buf.Count() * 3 / 2); */
buf.Resize(buf.Count() * 3 / 2);
}
return ret;
}


Loading…
Cancel
Save