Skip to content

Code formatting and style cleanup in 6502.{h,cc} #5

@wfd3

Description

@wfd3

Description

Several minor code formatting and style issues that should be cleaned up for consistency.

Issues

1. Mixed indentation in struct definition

Location: 6502/6502.h:344-350

struct instruction {
    const char *name;
    AddressingMode addrmode;  // Inconsistent indentation
    Byte bytes;

The struct has mixed tabs/spaces.

2. Unnecessary blank line

Location: 6502/6502.cc:254-256

bool MOS6502::validInstruction(const Byte opcode) {
    return _instructions.count(opcode) != 0;
           // Extra whitespace here
}

3. Inconsistent parameter const usage

Some pass-by-value parameters are marked const, others aren't. Should be consistent throughout.

4. Magic numbers in pushPS()

Location: 6502/6502.cc:314-315

constexpr Byte BreakBit  = 1 << 4;
constexpr Byte UnusedBit = 1 << 5;

These could be class-level constants since they're part of the 6502 specification.

Priority

Low - these are cosmetic issues that don't affect functionality.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions