mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-06 17:53:48 +02:00
Don't use memcpy with non-trivially-copyable type
This commit is contained in:
parent
61cce5882e
commit
3a2d4f95c2
1 changed files with 3 additions and 1 deletions
|
@ -123,7 +123,9 @@ void Space::categorizeAndGetChanges(std::vector<Space::Change>& changes) {
|
|||
uint32_t Space::copyProxyValues(Proxy* proxies, uint32_t numDestProxies) const {
|
||||
std::unique_lock<std::mutex> lock(_proxiesMutex);
|
||||
auto numCopied = std::min(numDestProxies, (uint32_t)_proxies.size());
|
||||
memcpy(proxies, _proxies.data(), numCopied * sizeof(Proxy));
|
||||
for(unsigned int i=0;i<numCopied;i++) {
|
||||
proxies[i] = _proxies[i];
|
||||
}
|
||||
return numCopied;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue