From 9c8df09475e7db600faf84b323881f0c3fe37f32 Mon Sep 17 00:00:00 2001 From: elsid Date: Tue, 10 Jan 2023 04:05:53 +0100 Subject: [PATCH] Remove user defined constructors for Interpreter --- components/interpreter/interpreter.cpp | 5 ----- components/interpreter/interpreter.hpp | 11 +++++------ 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/components/interpreter/interpreter.cpp b/components/interpreter/interpreter.cpp index 712c5ea380..bf0a9a61c6 100644 --- a/components/interpreter/interpreter.cpp +++ b/components/interpreter/interpreter.cpp @@ -104,11 +104,6 @@ namespace Interpreter } } - Interpreter::Interpreter() - : mRunning(false) - { - } - void Interpreter::run(const Type_Code* code, int codeSize, Context& context) { assert(codeSize >= 4); diff --git a/components/interpreter/interpreter.hpp b/components/interpreter/interpreter.hpp index 29cb48ead4..911fc716e6 100644 --- a/components/interpreter/interpreter.hpp +++ b/components/interpreter/interpreter.hpp @@ -16,17 +16,13 @@ namespace Interpreter class Interpreter { std::stack mCallstack; - bool mRunning; + bool mRunning = false; Runtime mRuntime; std::map> mSegment0; std::map> mSegment2; std::map> mSegment3; std::map> mSegment5; - // not implemented - Interpreter(const Interpreter&); - Interpreter& operator=(const Interpreter&); - void execute(Type_Code code); void begin(); @@ -41,7 +37,10 @@ namespace Interpreter } public: - Interpreter(); + Interpreter() = default; + + Interpreter(const Interpreter&) = delete; + Interpreter& operator=(const Interpreter&) = delete; template void installSegment0(int code, TArgs&&... args)