Fix Take() methods.

This commit is contained in:
Unknown W. Brackets committed 2014-11-24 07:47:57 -08:00
1 parent 73d5ad3b5c
commit c85fb55502
1 file changed
+1 -2
+1 -2
View File
@@ -58,13 +58,12 @@ void Buffer::Take(size_t length, std::string *dest) {
dest->resize(length);
if (length > 0) {
Take(length, &(*dest)[0]);
memcpy(&(*dest)[0], &data_[0], length);
data_.erase(data_.begin(), data_.begin() + length);
}
}
void Buffer::Take(size_t length, char *dest) {
memcpy(dest, &data_[0], length);
data_.erase(data_.begin(), data_.begin() + length);
}
int Buffer::TakeLineCRLF(std::string *dest) {