From 46e7c199b2f67e9c81917f24691a72f6c789bbe4 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Fri, 10 Nov 2017 22:08:40 -0500 Subject: [PATCH] Corrects improper initialisation order of the Commodore .tap and CRTMachine::Machine. --- Machines/CRTMachine.hpp | 8 +++----- Storage/Tape/Formats/CommodoreTAP.cpp | 1 - Storage/Tape/Formats/CommodoreTAP.hpp | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Machines/CRTMachine.hpp b/Machines/CRTMachine.hpp index 55ed44f93..1b8f62016 100644 --- a/Machines/CRTMachine.hpp +++ b/Machines/CRTMachine.hpp @@ -23,8 +23,6 @@ namespace CRTMachine { */ class Machine: public ROMMachine::Machine { public: - Machine() : clock_is_unlimited_(false), delegate_(nullptr) {} - /*! Causes the machine to set up its CRT and, if it has one, speaker. The caller guarantees that an OpenGL context is bound. @@ -75,9 +73,9 @@ class Machine: public ROMMachine::Machine { } private: - Delegate *delegate_; - double clock_rate_; - bool clock_is_unlimited_; + Delegate *delegate_ = nullptr; + double clock_rate_ = 1.0; + bool clock_is_unlimited_ = false; }; } diff --git a/Storage/Tape/Formats/CommodoreTAP.cpp b/Storage/Tape/Formats/CommodoreTAP.cpp index 428339cbb..74c7747fb 100644 --- a/Storage/Tape/Formats/CommodoreTAP.cpp +++ b/Storage/Tape/Formats/CommodoreTAP.cpp @@ -13,7 +13,6 @@ using namespace Storage::Tape; CommodoreTAP::CommodoreTAP(const char *file_name) : - is_at_end_(false), file_(file_name) { if(!file_.check_signature("C64-TAPE-RAW")) diff --git a/Storage/Tape/Formats/CommodoreTAP.hpp b/Storage/Tape/Formats/CommodoreTAP.hpp index d1f981ad0..ac3e637f1 100644 --- a/Storage/Tape/Formats/CommodoreTAP.hpp +++ b/Storage/Tape/Formats/CommodoreTAP.hpp @@ -44,7 +44,7 @@ class CommodoreTAP: public Tape { uint32_t file_size_; Pulse current_pulse_; - bool is_at_end_; + bool is_at_end_ = false; }; }