remove use of variable sized array
This commit is contained in:
parent
c1e55756b2
commit
d33a015749
1 changed files with 2 additions and 2 deletions
|
@ -31,10 +31,10 @@ static std::vector<chunk> chunk_file(const std::string filename, int chunk_size,
|
|||
}
|
||||
|
||||
chunk current_chunk;
|
||||
char buffer[chunk_size];
|
||||
char buffer[100];
|
||||
int64_t filepos = 0;
|
||||
std::string current = "";
|
||||
while (f.read(buffer, chunk_size)) {
|
||||
while (f.read(buffer, 100)) {
|
||||
current += std::string(buffer, f.gcount());
|
||||
size_t pos;
|
||||
while ((pos = current.find(chunk_separator)) != std::string::npos) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue