diff options
author | Lioncash <mathew1800@gmail.com> | 2018-07-19 10:15:00 -0400 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-07-19 10:46:54 -0400 |
commit | 3e9b79e088223459891ed07a747c411a6a8921d3 (patch) | |
tree | f65cb57670b5d421c394a598202df35d4f1eb267 /src/common/string_util.h | |
parent | f317080f406c940198debdcc2deb1669707742f1 (diff) |
fsp_srv: Remove unnecessary std::vector construction in IDirectory's Read() function
We were using a second std::vector as a buffer to convert another
std::vector's data into a byte sequence, however we can just use
pointers to the original data and use them directly with WriteBuffer,
which avoids copying the data at all into a separate std::vector.
We simply cast the pointers to u8* (which is allowed by the standard,
given std::uint8_t is an alias for unsigned char on platforms that we
support).
Diffstat (limited to 'src/common/string_util.h')
0 files changed, 0 insertions, 0 deletions