diff --git a/Configurable/Configurable.cpp b/Configurable/Configurable.cpp index a96997e90..1834d3eb4 100644 --- a/Configurable/Configurable.cpp +++ b/Configurable/Configurable.cpp @@ -19,7 +19,7 @@ ListSelection *ListSelection::list_selection() { } BooleanSelection *ListSelection::boolean_selection() { - return new BooleanSelection(value != "no" && value != "n"); + return new BooleanSelection(value != "no" && value != "n" && value != "false" && value != "f"); } BooleanSelection *BooleanSelection::boolean_selection() { diff --git a/Machines/Commodore/1540/Implementation/C1540.cpp b/Machines/Commodore/1540/Implementation/C1540.cpp index be61e8cb8..9d1073c77 100644 --- a/Machines/Commodore/1540/Implementation/C1540.cpp +++ b/Machines/Commodore/1540/Implementation/C1540.cpp @@ -278,7 +278,7 @@ void DriveVIA::set_activity_observer(Activity::Observer *observer) { void SerialPort::set_input(::Commodore::Serial::Line line, ::Commodore::Serial::LineLevel level) { std::shared_ptr serialPortVIA = serial_port_VIA_.lock(); - if(serialPortVIA) serialPortVIA->set_serial_line_state(line, (bool)level); + if(serialPortVIA) serialPortVIA->set_serial_line_state(line, static_cast(level)); } void SerialPort::set_serial_port_via(const std::shared_ptr &serialPortVIA) { diff --git a/Machines/Commodore/SerialBus.cpp b/Machines/Commodore/SerialBus.cpp index d2725ffb9..f9441f39b 100644 --- a/Machines/Commodore/SerialBus.cpp +++ b/Machines/Commodore/SerialBus.cpp @@ -45,7 +45,7 @@ void Bus::set_line_output_did_change(Line line) { for(std::weak_ptr port : ports_) { std::shared_ptr locked_port = port.lock(); if(locked_port) { - new_line_level = (LineLevel)((bool)new_line_level & (bool)locked_port->get_output(line)); + new_line_level = (LineLevel)(static_cast(new_line_level) & static_cast(locked_port->get_output(line))); } } diff --git a/Machines/Commodore/Vic-20/Vic20.cpp b/Machines/Commodore/Vic-20/Vic20.cpp index 8268d063a..d56a21c88 100644 --- a/Machines/Commodore/Vic-20/Vic20.cpp +++ b/Machines/Commodore/Vic-20/Vic20.cpp @@ -214,7 +214,7 @@ class SerialPort : public ::Commodore::Serial::Port { /// Receives an input change from the base serial port class, and communicates it to the user-port VIA. void set_input(::Commodore::Serial::Line line, ::Commodore::Serial::LineLevel level) { std::shared_ptr userPortVIA = user_port_via_.lock(); - if(userPortVIA) userPortVIA->set_serial_line_state(line, (bool)level); + if(userPortVIA) userPortVIA->set_serial_line_state(line, static_cast(level)); } /// Sets the user-port VIA with which this serial port communicates. diff --git a/Storage/Tape/Tape.cpp b/Storage/Tape/Tape.cpp index 5b83c05b1..72ece532d 100644 --- a/Storage/Tape/Tape.cpp +++ b/Storage/Tape/Tape.cpp @@ -81,7 +81,7 @@ std::shared_ptr TapePlayer::get_tape() { } bool TapePlayer::has_tape() { - return (bool)tape_; + return static_cast(tape_); } void TapePlayer::get_next_pulse() {