From 539837ae4eb37b776deb3331fc364fccd4b2a0eb Mon Sep 17 00:00:00 2001 From: Riyyi Date: Wed, 17 Aug 2022 22:55:42 +0200 Subject: [PATCH] Emu: Singleton example --- src/emu.h | 2 +- src/main.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/emu.h b/src/emu.h index bff6129..799c5a5 100644 --- a/src/emu.h +++ b/src/emu.h @@ -6,7 +6,7 @@ #include "processing-unit.h" #include "ruc/singleton.h" -class Emu : ruc::Singleton { +class Emu final : public ruc::Singleton { public: Emu(s) {} diff --git a/src/main.cpp b/src/main.cpp index 3c59f96..34c9cf2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,5 +1,6 @@ #include +#include "emu.h" #include "ruc/timer.h" int main(int argc, char* argv[]) @@ -8,5 +9,7 @@ int main(int argc, char* argv[]) printf("%fms\n", t.elapsedNanoseconds() / 1000000.0); + Emu::the().ReadRAM(0, 0); + return 0; }