mirror of https://github.com/stella-emu/stella.git
Some more const updates for Mac port.
This commit is contained in:
parent
ad850959c0
commit
5258d05167
|
@ -101,14 +101,14 @@ StringList SerialPortMACOS::portNames()
|
|||
|
||||
// Check if port is valid; for now that means if it can be opened
|
||||
// Eventually we may extend this to do more intensive checks
|
||||
auto isPortValid = [](const string& port) {
|
||||
int handle = open(port.c_str(), O_RDWR | O_NOCTTY | O_NONBLOCK);
|
||||
const auto isPortValid = [](const string& port) {
|
||||
const int handle = open(port.c_str(), O_RDWR | O_NOCTTY | O_NONBLOCK);
|
||||
if(handle > 0) close(handle);
|
||||
return handle > 0;
|
||||
};
|
||||
|
||||
// Get all possible devices in the '/dev' directory
|
||||
FilesystemNode::NameFilter filter = [](const FilesystemNode& node) {
|
||||
const FilesystemNode::NameFilter filter = [](const FilesystemNode& node) {
|
||||
return BSPF::startsWithIgnoreCase(node.getPath(), "/dev/cu.usb");
|
||||
};
|
||||
FSList portList;
|
||||
|
|
Loading…
Reference in New Issue