mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-23 03:32:32 +00:00
Merge pull request #548 from TomHarte/MoreBooleans
Adds 'false' and 'f' to the list of acceptable command-line option falses.
This commit is contained in:
commit
3358c07107
@ -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() {
|
||||
|
@ -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> 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<bool>(level));
|
||||
}
|
||||
|
||||
void SerialPort::set_serial_port_via(const std::shared_ptr<SerialPortVIA> &serialPortVIA) {
|
||||
|
@ -45,7 +45,7 @@ void Bus::set_line_output_did_change(Line line) {
|
||||
for(std::weak_ptr<Port> port : ports_) {
|
||||
std::shared_ptr<Port> 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<bool>(new_line_level) & static_cast<bool>(locked_port->get_output(line)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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> 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<bool>(level));
|
||||
}
|
||||
|
||||
/// Sets the user-port VIA with which this serial port communicates.
|
||||
|
@ -81,7 +81,7 @@ std::shared_ptr<Storage::Tape::Tape> TapePlayer::get_tape() {
|
||||
}
|
||||
|
||||
bool TapePlayer::has_tape() {
|
||||
return (bool)tape_;
|
||||
return static_cast<bool>(tape_);
|
||||
}
|
||||
|
||||
void TapePlayer::get_next_pulse() {
|
||||
|
Loading…
Reference in New Issue
Block a user