mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-15 05:31:30 +00:00
More minor style improvements.
This commit is contained in:
parent
e9177bbb2a
commit
5c90744f0c
@ -19,7 +19,7 @@ Parser::Parser(): crc_(0x1021) {
|
||||
}
|
||||
|
||||
int Parser::get_next_bit(const std::shared_ptr<Storage::Tape::Tape> &tape) {
|
||||
SymbolType symbol = get_next_symbol(tape);
|
||||
const SymbolType symbol = get_next_symbol(tape);
|
||||
return (symbol == SymbolType::One) ? 1 : 0;
|
||||
}
|
||||
|
||||
@ -55,7 +55,7 @@ unsigned int Parser::get_next_word(const std::shared_ptr<Storage::Tape::Tape> &t
|
||||
}
|
||||
|
||||
void Parser::reset_crc() { crc_.reset(); }
|
||||
uint16_t Parser::get_crc() { return crc_.get_value(); }
|
||||
uint16_t Parser::get_crc() const { return crc_.get_value(); }
|
||||
|
||||
void Parser::acorn_shifter_output_bit(int value) {
|
||||
push_symbol(value ? SymbolType::One : SymbolType::Zero);
|
||||
|
@ -55,7 +55,7 @@ class Parser: public Storage::Tape::Parser<SymbolType>, public Shifter::Delegate
|
||||
unsigned int get_next_short(const std::shared_ptr<Storage::Tape::Tape> &tape);
|
||||
unsigned int get_next_word(const std::shared_ptr<Storage::Tape::Tape> &tape);
|
||||
void reset_crc();
|
||||
uint16_t get_crc();
|
||||
uint16_t get_crc() const;
|
||||
|
||||
private:
|
||||
void acorn_shifter_output_bit(int value) override;
|
||||
|
@ -45,8 +45,7 @@ class Parser: public Storage::Tape::PulseClassificationParser<WaveType, SymbolTy
|
||||
bool wave_was_high_;
|
||||
float cycle_length_;
|
||||
|
||||
struct Pattern
|
||||
{
|
||||
struct Pattern {
|
||||
WaveType type;
|
||||
int count = 0;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user