diff --git a/src/debugger/CartDebug.cxx b/src/debugger/CartDebug.cxx index a65df8301..cd0286482 100644 --- a/src/debugger/CartDebug.cxx +++ b/src/debugger/CartDebug.cxx @@ -52,11 +52,11 @@ CartDebug::CartDebug(Debugger& dbg, Console& console, const OSystem& osystem) { // Add case sensitive compare for user labels // TODO - should user labels be case insensitive too? - auto usrCmp = [](const string& a, const string& b) { return a < b; }; + const auto usrCmp = [](const string& a, const string& b) { return a < b; }; myUserAddresses = LabelToAddr(usrCmp); // Add case insensitive compare for system labels - auto sysCmp = [](const string& a, const string& b) { + const auto sysCmp = [](const string& a, const string& b) { return BSPF::compareIgnoreCase(a, b) < 0; }; mySystemAddresses = LabelToAddr(sysCmp); diff --git a/src/emucore/SerialPort.hxx b/src/emucore/SerialPort.hxx index 988fc6abf..1dc4d5eb4 100644 --- a/src/emucore/SerialPort.hxx +++ b/src/emucore/SerialPort.hxx @@ -39,10 +39,11 @@ class SerialPort @param device The name of the port @return False on any errors, else true */ - virtual bool openPort(const string& device) { return false; } + virtual bool openPort(const string& device) = 0; /** Read a byte from the serial port. + NOTE: This is for potential future use; no class currently uses this. @param data Destination for the byte read from the port @return True if a byte was read, else false @@ -55,13 +56,7 @@ class SerialPort @param data The byte to write to the port @return True if a byte was written, else false */ - virtual bool writeByte(uInt8 data) { return false; } - - private: - /** - Close a previously opened serial port. - */ - virtual void closePort() { } + virtual bool writeByte(uInt8 data) = 0; private: // Following constructors and assignment operators not supported diff --git a/src/gui/Dialog.cxx b/src/gui/Dialog.cxx index 718ba91bc..c076dcebe 100644 --- a/src/gui/Dialog.cxx +++ b/src/gui/Dialog.cxx @@ -68,7 +68,6 @@ Dialog::Dialog(OSystem& instance, DialogContainer& parent, const GUI::Font& font _max_h(0) { setTitle(title); - setDirty(); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -157,8 +156,6 @@ void Dialog::setTitle(const string& title) else _th = _font.getLineHeight() + 4; _h += _th; - - setDirty(); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/macos/SerialPortMACOS.cxx b/src/macos/SerialPortMACOS.cxx index 0498792bd..77dfcee08 100644 --- a/src/macos/SerialPortMACOS.cxx +++ b/src/macos/SerialPortMACOS.cxx @@ -37,7 +37,11 @@ SerialPortMACOS::SerialPortMACOS() // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SerialPortMACOS::~SerialPortMACOS() { - closePort(); + if(myHandle) + { + close(myHandle); + myHandle = 0; + } } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -60,16 +64,6 @@ bool SerialPortMACOS::openPort(const string& device) return true; } -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -void SerialPortMACOS::closePort() -{ - if(myHandle) - { - close(myHandle); - myHandle = 0; - } -} - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bool SerialPortMACOS::writeByte(uInt8 data) { diff --git a/src/macos/SerialPortMACOS.hxx b/src/macos/SerialPortMACOS.hxx index 61ef7d284..b2fc6855f 100644 --- a/src/macos/SerialPortMACOS.hxx +++ b/src/macos/SerialPortMACOS.hxx @@ -40,11 +40,6 @@ class SerialPortMACOS : public SerialPort */ bool openPort(const string& device) override; - /** - Close a previously opened serial port. - */ - void closePort() override; - /** Write a byte to the serial port. diff --git a/src/unix/SerialPortUNIX.cxx b/src/unix/SerialPortUNIX.cxx index b342fa044..f38b41e4c 100644 --- a/src/unix/SerialPortUNIX.cxx +++ b/src/unix/SerialPortUNIX.cxx @@ -36,7 +36,11 @@ SerialPortUNIX::SerialPortUNIX() // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SerialPortUNIX::~SerialPortUNIX() { - closePort(); + if(myHandle) + { + close(myHandle); + myHandle = 0; + } } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -58,16 +62,6 @@ bool SerialPortUNIX::openPort(const string& device) return true; } -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -void SerialPortUNIX::closePort() -{ - if(myHandle) - { - close(myHandle); - myHandle = 0; - } -} - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bool SerialPortUNIX::writeByte(uInt8 data) { diff --git a/src/unix/SerialPortUNIX.hxx b/src/unix/SerialPortUNIX.hxx index a7afcd55a..551c2a15d 100644 --- a/src/unix/SerialPortUNIX.hxx +++ b/src/unix/SerialPortUNIX.hxx @@ -40,11 +40,6 @@ class SerialPortUNIX : public SerialPort */ bool openPort(const string& device) override; - /** - Close a previously opened serial port. - */ - void closePort() override; - /** Write a byte to the serial port. diff --git a/src/windows/SerialPortWINDOWS.cxx b/src/windows/SerialPortWINDOWS.cxx index 2feb41d0b..bb81942af 100644 --- a/src/windows/SerialPortWINDOWS.cxx +++ b/src/windows/SerialPortWINDOWS.cxx @@ -29,7 +29,11 @@ SerialPortWINDOWS::SerialPortWINDOWS() // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SerialPortWINDOWS::~SerialPortWINDOWS() { - closePort(); + if(myHandle) + { + CloseHandle(myHandle); + myHandle = 0; + } } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -65,16 +69,6 @@ bool SerialPortWINDOWS::openPort(const string& device) return true; } -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -void SerialPortWINDOWS::closePort() -{ - if(myHandle) - { - CloseHandle(myHandle); - myHandle = 0; - } -} - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bool SerialPortWINDOWS::writeByte(uInt8 data) { diff --git a/src/windows/SerialPortWINDOWS.hxx b/src/windows/SerialPortWINDOWS.hxx index 7d6c75cf0..6287aa597 100644 --- a/src/windows/SerialPortWINDOWS.hxx +++ b/src/windows/SerialPortWINDOWS.hxx @@ -39,11 +39,6 @@ class SerialPortWINDOWS : public SerialPort */ bool openPort(const string& device) override; - /** - Close a previously opened serial port. - */ - void closePort() override; - /** Write a byte to the serial port.