1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-05 10:28:58 +00:00

Avoid memset.

This commit is contained in:
Thomas Harte 2022-05-18 17:00:35 -04:00
parent c35200fbd0
commit 13a1809101

View File

@ -217,7 +217,7 @@ struct TestProcessor: public CPU::MC68000Mk2::BusHandler {
- (void)testOperationClassic:(NSDictionary *)test name:(NSString *)name {
auto uniqueTest68000 = std::make_unique<TestProcessor>(_ram.data());
auto test68000 = uniqueTest68000.get();
memset(_ram.data(), 0xce, _ram.size());
_ram.fill(0xce);
{
// Apply initial memory state.
@ -299,7 +299,7 @@ struct TestProcessor: public CPU::MC68000Mk2::BusHandler {
// Definitively erase any prior memory contents;
// 0xce is arbitrary but hopefully easier to spot
// in potential errors than e.g. 0x00 or 0xff.
memset(_ram.data(), 0xce, _ram.size());
_ram.fill(0xce);
// Apply initial memory state.
NSArray<NSNumber *> *const initialMemory = test[@"initial memory"];