mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 01:20:42 +00:00
Use bytebuf::assign() instead of resize, memcpy
This commit is contained in:
committed by
Baldur Karlsson
parent
1f6b2abc12
commit
d3e2231ba9
@@ -35,8 +35,7 @@ void ObjC::Get_defaultLibraryData(bytebuf &buffer)
|
||||
dispatch_data_t data = dispatch_data_create(
|
||||
myData.bytes, myData.length, dispatch_get_main_queue(), DISPATCH_DATA_DESTRUCTOR_DEFAULT);
|
||||
NSData *nsData = (NSData *)data;
|
||||
buffer.resize(nsData.length);
|
||||
memcpy(buffer.data(), nsData.bytes, buffer.size());
|
||||
buffer.assign((byte *)nsData.bytes, nsData.length);
|
||||
dispatch_release(data);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user