From 4a1fa8fc13d29ad57b518356c4f6f740aad2c6ea Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Mon, 28 Oct 2019 21:13:42 -0400 Subject: [PATCH] Adds some const qualifiers. --- Machines/Oric/Microdisc.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Machines/Oric/Microdisc.cpp b/Machines/Oric/Microdisc.cpp index d31114b2d..8364f5106 100644 --- a/Machines/Oric/Microdisc.cpp +++ b/Machines/Oric/Microdisc.cpp @@ -32,7 +32,7 @@ void Microdisc::set_disk(std::shared_ptr disk, size_t drive } void Microdisc::set_control_register(uint8_t control) { - uint8_t changes = last_control_ ^ control; + const uint8_t changes = last_control_ ^ control; last_control_ = control; set_control_register(control, changes); } @@ -48,7 +48,7 @@ void Microdisc::set_control_register(uint8_t control, uint8_t changes) { // b4: side select if(changes & 0x10) { - int head = (control & 0x10) ? 1 : 0; + const int head = (control & 0x10) ? 1 : 0; for(auto &drive : drives_) { if(drive) drive->set_head(head); } @@ -61,9 +61,9 @@ void Microdisc::set_control_register(uint8_t control, uint8_t changes) { // b0: IRQ enable if(changes & 0x01) { - bool had_irq = get_interrupt_request_line(); + const bool had_irq = get_interrupt_request_line(); irq_enable_ = !!(control & 0x01); - bool has_irq = get_interrupt_request_line(); + const bool has_irq = get_interrupt_request_line(); if(has_irq != had_irq && delegate_) { delegate_->wd1770_did_change_output(this); }