1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-06-25 18:30:07 +00:00

Enables -Wreorder and corrects a few of the more trivial fixes thereby suggested.

This commit is contained in:
Thomas Harte 2017-11-09 22:14:22 -05:00
parent c0055a5a5f
commit 2203499215
7 changed files with 24 additions and 23 deletions

View File

@ -11,11 +11,7 @@
using namespace ZX8081;
Video::Video() :
crt_(new Outputs::CRT::CRT(207 * 2, 1, Outputs::CRT::DisplayType::PAL50, 1)),
line_data_(nullptr),
line_data_pointer_(nullptr),
cycles_since_update_(0),
sync_(false) {
crt_(new Outputs::CRT::CRT(207 * 2, 1, Outputs::CRT::DisplayType::PAL50, 1)) {
// Set a composite sampling function that assumes 8bpp input grayscale.
// TODO: lessen this to 1bpp.

View File

@ -42,9 +42,10 @@ class Video {
void output_byte(uint8_t byte);
private:
bool sync_;
uint8_t *line_data_, *line_data_pointer_;
unsigned int cycles_since_update_;
bool sync_ = false;
uint8_t *line_data_ = nullptr;
uint8_t *line_data_pointer_ = nullptr;
unsigned int cycles_since_update_ = 0;
std::shared_ptr<Outputs::CRT::CRT> crt_;
void flush(bool next_sync);

View File

@ -3651,6 +3651,10 @@
GCC_WARN_SIGN_COMPARE = YES;
INFOPLIST_FILE = "Clock Signal/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
OTHER_CPLUSPLUSFLAGS = (
"$(OTHER_CFLAGS)",
"-Wreorder",
);
PRODUCT_BUNDLE_IDENTIFIER = "TH.Clock-Signal";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Clock Signal/ClockSignal-Bridging-Header.h";
@ -3685,6 +3689,10 @@
GCC_WARN_SIGN_COMPARE = YES;
INFOPLIST_FILE = "Clock Signal/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
OTHER_CPLUSPLUSFLAGS = (
"$(OTHER_CFLAGS)",
"-Wreorder",
);
PRODUCT_BUNDLE_IDENTIFIER = "TH.Clock-Signal";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Clock Signal/ClockSignal-Bridging-Header.h";

View File

@ -83,7 +83,7 @@ class Speaker {
set_needs_updated_filter_coefficients();
}
Speaker() : buffer_in_progress_pointer_(0), requested_number_of_taps_(0), high_frequency_cut_off_(-1.0), _queue(new Concurrency::AsyncTaskQueue) {}
Speaker() : _queue(new Concurrency::AsyncTaskQueue) {}
/*!
Ensures any deferred processing occurs now.
@ -107,9 +107,10 @@ class Speaker {
std::shared_ptr<std::list<std::function<void(void)>>> queued_functions_;
std::vector<int16_t> buffer_in_progress_;
float high_frequency_cut_off_;
size_t buffer_in_progress_pointer_;
size_t number_of_taps_, requested_number_of_taps_;
float high_frequency_cut_off_ = -1.0;
size_t buffer_in_progress_pointer_ = 0;
size_t number_of_taps_;
size_t requested_number_of_taps_ = 0;
bool coefficients_are_dirty_;
Delegate *delegate_ = nullptr;

View File

@ -49,10 +49,6 @@
using namespace Storage::Tape;
PRG::PRG(const char *file_name) :
bit_phase_(3),
file_phase_(FilePhaseLeadIn),
phase_offset_(0),
copy_mask_(0x80),
file_(file_name)
{
// There's really no way to validate other than that if this file is larger than 64kb,

View File

@ -50,10 +50,10 @@ class PRG: public Tape {
FilePhaseHeaderDataGap,
FilePhaseData,
FilePhaseAtEnd
} file_phase_;
int phase_offset_;
} file_phase_ = FilePhaseLeadIn;
int phase_offset_ = 0;
int bit_phase_;
int bit_phase_ = 3;
enum OutputToken {
Leader,
Zero,
@ -65,7 +65,7 @@ class PRG: public Tape {
void get_next_output_token();
uint8_t output_byte_;
uint8_t check_digit_;
uint8_t copy_mask_;
uint8_t copy_mask_ = 0x80;
};
}

View File

@ -20,7 +20,6 @@ namespace Tape {
template <typename SymbolType> class Parser {
public:
Parser() : has_next_symbol_(false), error_flag_(false) {}
/// Resets the error flag.
void reset_error_flag() { error_flag_ = false; }
/// @returns @c true if an error has occurred since the error flag was last reset; @c false otherwise.
@ -81,9 +80,9 @@ template <typename SymbolType> class Parser {
error_flag_ = true;
}
bool error_flag_;
bool error_flag_ = false;
SymbolType next_symbol_;
bool has_next_symbol_;
bool has_next_symbol_ = false;
};
/*!