Skip to content

Commit 286ab7d

Browse files
committed
Use .data() to access vector array
1 parent 026cdc1 commit 286ab7d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/osvr/USBSerial/USBSerialDevInfo_MacOSX.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,11 @@ namespace usbserial {
129129
kCFStringEncodingMacRoman) +
130130
sizeof('\0');
131131
std::vector<char> bsdPathBuf(bufferSize);
132-
CFStringGetCString(bsdPathObj, &bsdPathBuf[0], bufferSize,
132+
CFStringGetCString(bsdPathObj, bsdPathBuf.data(), bufferSize,
133133
kCFStringEncodingMacRoman);
134134
// create the device
135-
USBSerialDevice usb_serial_device(vid, pid, &bsdPathBuf[0],
136-
&bsdPathBuf[0]);
135+
USBSerialDevice usb_serial_device(vid, pid, bsdPathBuf.data(),
136+
bsdPathBuf.data());
137137
// check if IDs match and add
138138
if (matches_ids(usb_serial_device, vendorID, productID)) {
139139
devices.push_back(usb_serial_device);

0 commit comments

Comments
 (0)