Skip to content

Commit

Permalink
Use .data() to access vector array
Browse files Browse the repository at this point in the history
  • Loading branch information
d235j committed Oct 14, 2015
1 parent 026cdc1 commit 286ab7d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/osvr/USBSerial/USBSerialDevInfo_MacOSX.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,11 @@ namespace usbserial {
kCFStringEncodingMacRoman) +
sizeof('\0');
std::vector<char> bsdPathBuf(bufferSize);
CFStringGetCString(bsdPathObj, &bsdPathBuf[0], bufferSize,
CFStringGetCString(bsdPathObj, bsdPathBuf.data(), bufferSize,
kCFStringEncodingMacRoman);
// create the device
USBSerialDevice usb_serial_device(vid, pid, &bsdPathBuf[0],
&bsdPathBuf[0]);
USBSerialDevice usb_serial_device(vid, pid, bsdPathBuf.data(),
bsdPathBuf.data());
// check if IDs match and add
if (matches_ids(usb_serial_device, vendorID, productID)) {
devices.push_back(usb_serial_device);
Expand Down

0 comments on commit 286ab7d

Please sign in to comment.