mirror of
https://github.com/mii443/libdatachannel.git
synced 2025-08-22 23:25:33 +00:00
Replace memcpy with std::copy in copyAndReturn
This commit is contained in:
@ -275,7 +275,7 @@ int copyAndReturn(std::vector<T> b, T *buffer, int size) {
|
|||||||
|
|
||||||
if (size < int(b.size()))
|
if (size < int(b.size()))
|
||||||
return RTC_ERR_TOO_SMALL;
|
return RTC_ERR_TOO_SMALL;
|
||||||
memcpy(buffer, b.data(), b.size() * sizeof(*buffer));
|
std::copy(b.begin(), b.end(), buffer);
|
||||||
return int(b.size());
|
return int(b.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user