Skip to content

Commit cd1c99b

Browse files
committed
Merge origin/master into performance_improvements: resolve conflicts, keep header-only core, align tests and CMake, remove legacy src/z80.cpp
1 parent 03ff405 commit cd1c99b

3 files changed

Lines changed: 13 additions & 23 deletions

File tree

include/z80_bus_interface.h

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,15 @@
1-
#ifndef Z80_BUS_INTERFACE_HPP
2-
#define Z80_BUS_INTERFACE_HPP
1+
#ifndef Z80_BUS_INTERFACE_H
2+
#define Z80_BUS_INTERFACE_H
33

44
#include <cstdint>
55

66
#include "z80_types.h"
77

88
// CRTP bus interface: TBusInterface must implement the *Impl methods.
99
template <typename TBusInterface> class Z80BusInterface {
10-
public:
11-
private:
12-
Z80BusInterface() = default;
13-
1410
public:
1511
~Z80BusInterface() = default;
16-
17-
private:
18-
Z80BusInterface(const Z80BusInterface&) = default;
19-
20-
public:
2112
Z80BusInterface& operator=(const Z80BusInterface&) = default;
22-
23-
private:
24-
Z80BusInterface(Z80BusInterface&&) = default;
25-
26-
public:
2713
Z80BusInterface& operator=(Z80BusInterface&&) = default;
2814

2915
/* Read opcode from RAM */
@@ -88,11 +74,15 @@ template <typename TBusInterface> class Z80BusInterface {
8874
#endif
8975

9076
private:
77+
Z80BusInterface() = default;
78+
Z80BusInterface(const Z80BusInterface&) = default;
79+
Z80BusInterface(Z80BusInterface&&) = default;
80+
9181
TBusInterface& derived() {
9282
return static_cast<TBusInterface&>(*this);
9383
}
9484

9585
friend TBusInterface;
9686
};
9787

98-
#endif // Z80_BUS_INTERFACE_HPP
88+
#endif // Z80_BUS_INTERFACE_H

include/z80_types.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef Z80_TYPES_HPP
2-
#define Z80_TYPES_HPP
1+
#ifndef Z80_TYPES_H
2+
#define Z80_TYPES_H
33

44
#include <cstdint>
55

@@ -47,4 +47,4 @@ using RegisterPair = union {
4747
uint16_t word;
4848
};
4949

50-
#endif // Z80_TYPES_HPP
50+
#endif // Z80_TYPES_H

tests/z80_sim_test.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef Z80_SIM_TEST_HPP
2-
#define Z80_SIM_TEST_HPP
1+
#ifndef Z80_SIM_TEST_H
2+
#define Z80_SIM_TEST_H
33

44
#include <array>
55
#include <chrono>
@@ -58,4 +58,4 @@ class Z80SimTest : public Z80BusInterface<Z80SimTest> {
5858
void runTest(std::ifstream* fileStream);
5959
};
6060

61-
#endif // Z80_SIM_TEST_HPP
61+
#endif // Z80_SIM_TEST_H

0 commit comments

Comments
 (0)