util/{Const,Writable}Buffer: add operator[]

This commit is contained in:
Max Kellermann
2014-03-01 07:25:17 +01:00
parent 9dc5335e3e
commit 4ba7427fa0
7 changed files with 41 additions and 19 deletions

View File

@@ -63,7 +63,7 @@ bool TextInputStream::ReadLine(std::string &line)
the current line */
dest = buffer.Write();
assert(!dest.IsEmpty());
dest.data[0] = '\n';
dest[0] = '\n';
buffer.Append(1);
}
} while (p == nullptr);