Fix some size types

This commit is contained in:
Chris Robinson 2021-06-18 21:03:31 -07:00
parent a7d2e2974f
commit 04a6e418d7

View File

@ -97,9 +97,9 @@ std::string GetDeviceName(AudioDeviceID devId)
sizeof(nameRef), &nameRef)}; sizeof(nameRef), &nameRef)};
if(err == noErr) if(err == noErr)
{ {
UInt32 propSize{CFStringGetMaximumSizeForEncoding(CFStringGetLength(nameRef), const CFIndex propSize{CFStringGetMaximumSizeForEncoding(CFStringGetLength(nameRef),
kCFStringEncodingUTF8)}; kCFStringEncodingUTF8)};
devname.resize(propSize+1, '\0'); devname.resize(static_cast<size_t>(propSize)+1, '\0');
CFStringGetCString(nameRef, &devname[0], propSize+1, kCFStringEncodingUTF8); CFStringGetCString(nameRef, &devname[0], propSize+1, kCFStringEncodingUTF8);
CFRelease(nameRef); CFRelease(nameRef);