From 9d953421d8282b6499635956585f16917bc9f7d4 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Tue, 1 Aug 2017 07:07:43 -0400 Subject: [PATCH] After a quick check, added a couple of other _delegate initialisations. I should probably find a way to template this. --- Machines/CRTMachine.hpp | 2 +- Storage/Disk/DigitalPhaseLockedLoop.cpp | 3 ++- Storage/Tape/Parsers/Acorn.cpp | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Machines/CRTMachine.hpp b/Machines/CRTMachine.hpp index 48f7b7991..96f2ba7fd 100644 --- a/Machines/CRTMachine.hpp +++ b/Machines/CRTMachine.hpp @@ -57,7 +57,7 @@ class Machine { virtual void machine_did_change_clock_rate(Machine *machine) = 0; virtual void machine_did_change_clock_is_unlimited(Machine *machine) = 0; }; - void set_delegate(Delegate *delegate) { this->delegate_ = delegate; } + void set_delegate(Delegate *delegate) { delegate_ = delegate; } protected: void set_clock_rate(double clock_rate) { diff --git a/Storage/Disk/DigitalPhaseLockedLoop.cpp b/Storage/Disk/DigitalPhaseLockedLoop.cpp index 9e99aa054..8348049c9 100644 --- a/Storage/Disk/DigitalPhaseLockedLoop.cpp +++ b/Storage/Disk/DigitalPhaseLockedLoop.cpp @@ -18,7 +18,8 @@ DigitalPhaseLockedLoop::DigitalPhaseLockedLoop(int clocks_per_bit, size_t length window_length_(clocks_per_bit), offset_history_pointer_(0), offset_history_(length_of_history, 0), - offset_(0) {} + offset_(0), + delegate_(nullptr) {} void DigitalPhaseLockedLoop::run_for(const Cycles cycles) { offset_ += cycles.as_int(); diff --git a/Storage/Tape/Parsers/Acorn.cpp b/Storage/Tape/Parsers/Acorn.cpp index 3cf875198..519fa3fe7 100644 --- a/Storage/Tape/Parsers/Acorn.cpp +++ b/Storage/Tape/Parsers/Acorn.cpp @@ -69,7 +69,8 @@ Shifter::Shifter() : pll_(PLLClockRate / 4800, 15), was_high_(false), input_pattern_(0), - input_bit_counter_(0) { + input_bit_counter_(0), + delegate_(nullptr) { pll_.set_delegate(this); }