--- nono/vm/mfp.cpp 2026/04/29 17:04:55 1.1.1.10 +++ nono/vm/mfp.cpp 2026/04/29 17:04:59 1.1.1.11 @@ -19,7 +19,7 @@ MFPDevice::MFPDevice() devaddr = baseaddr; devlen = 0x2000; - for (int ch = 0; ch < countof(event); ch++) { + for (int ch = 0; ch < event.size(); ch++) { event[ch].dev = this; event[ch].func = (DeviceCallback_t)&MFPDevice::TimerCallback; event[ch].code = ch; @@ -63,8 +63,8 @@ MFPDevice::ResetHard() mfp.tsr = MFP::TSR_BE; // All timers are stopped. - for (int ch = 0; ch < countof(event); ch++) { - event[ch].Stop(); + for (auto& ev : event) { + ev.Stop(); } key_event.Stop();