<< " 0x" << off << "~" << len << std::dec
<< dendl;
- // NOTE: h->bl is normally a contiguous buffer so c_str() is free.
- memcpy(out, buf->bl.c_str() + off - buf->bl_off, r);
+ auto p = buf->bl.begin();
+ p.seek(off - buf->bl_off);
+ p.copy(r, out);
out += r;
dout(30) << __func__ << " result chunk (0x"
outbl->claim_append(t);
}
if (out) {
- // NOTE: h->bl is normally a contiguous buffer so c_str() is free.
- memcpy(out, buf->bl.c_str() + off - buf->bl_off, r);
+ auto p = buf->bl.begin();
+ p.seek(off - buf->bl_off);
+ p.copy(r, out);
out += r;
}