tdf#163691 Use std::copy() and std::copy_n instead of memcpy()
Signed-off-by: Neacsa Leonard <leonardneacsa2005@gmail.com> Change-Id: I7d69cbb0c93f5d9223607f519bbcf5e2acb393cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194359 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
This commit is contained in:
committed by
Ilmari Lauhakangas
parent
8ab2bc8b4d
commit
9f25059ea1
@@ -425,9 +425,9 @@ void Writer::sendMessage(std::vector< unsigned char > const & buffer) {
|
||||
}
|
||||
css::uno::Sequence<sal_Int8> s(header.size() + k);
|
||||
assert(!header.empty());
|
||||
std::memcpy(s.getArray(), header.data(), header.size());
|
||||
std::copy_n(header.data(), header.size(), s.getArray());
|
||||
for (;;) {
|
||||
std::memcpy(s.getArray() + s.getLength() - k, p, k);
|
||||
std::copy(p, p + k, s.getArray() + header.size());
|
||||
try {
|
||||
bridge_->getConnection()->write(s);
|
||||
} catch (const css::io::IOException & e) {
|
||||
|
||||
Reference in New Issue
Block a user