diff --git a/Machines/Electron/Tape.cpp b/Machines/Electron/Tape.cpp index a137738ee..4d0d37959 100644 --- a/Machines/Electron/Tape.cpp +++ b/Machines/Electron/Tape.cpp @@ -72,7 +72,7 @@ uint8_t Tape::get_data_register() { return (uint8_t)(data_register_ >> 2); } -void Tape::process_input_pulse(Storage::Tape::Tape::Pulse pulse) { +void Tape::process_input_pulse(const Storage::Tape::Tape::Pulse &pulse) { shifter_.process_pulse(pulse); } diff --git a/Machines/Electron/Tape.hpp b/Machines/Electron/Tape.hpp index 2019d3a54..2d499e5e7 100644 --- a/Machines/Electron/Tape.hpp +++ b/Machines/Electron/Tape.hpp @@ -45,7 +45,7 @@ class Tape: void acorn_shifter_output_bit(int value); private: - void process_input_pulse(Storage::Tape::Tape::Pulse pulse); + void process_input_pulse(const Storage::Tape::Tape::Pulse &pulse); inline void push_tape_bit(uint16_t bit); inline void get_next_tape_pulse(); diff --git a/Storage/Tape/Tape.cpp b/Storage/Tape/Tape.cpp index 3fef2973e..b615fcf50 100644 --- a/Storage/Tape/Tape.cpp +++ b/Storage/Tape/Tape.cpp @@ -108,7 +108,7 @@ void BinaryTapePlayer::set_delegate(Delegate *delegate) { delegate_ = delegate; } -void BinaryTapePlayer::process_input_pulse(Storage::Tape::Tape::Pulse pulse) { +void BinaryTapePlayer::process_input_pulse(const Storage::Tape::Tape::Pulse &pulse) { bool new_input_level = pulse.type == Tape::Pulse::High; if(input_level_ != new_input_level) { input_level_ = new_input_level; diff --git a/Storage/Tape/Tape.hpp b/Storage/Tape/Tape.hpp index 483f8e551..2cd6c028b 100644 --- a/Storage/Tape/Tape.hpp +++ b/Storage/Tape/Tape.hpp @@ -87,7 +87,7 @@ class TapePlayer: public TimedEventLoop { protected: virtual void process_next_event(); - virtual void process_input_pulse(Tape::Pulse pulse) = 0; + virtual void process_input_pulse(const Tape::Pulse &pulse) = 0; private: inline void get_next_pulse(); @@ -121,7 +121,7 @@ class BinaryTapePlayer: public TapePlayer { protected: Delegate *delegate_; - virtual void process_input_pulse(Storage::Tape::Tape::Pulse pulse); + virtual void process_input_pulse(const Storage::Tape::Tape::Pulse &pulse); bool input_level_; bool motor_is_running_; };