Remove user defined constructors for Interpreter

7220-lua-add-a-general-purpose-lexical-parser
elsid 2 years ago
parent 6a9af5ccca
commit 9c8df09475
No known key found for this signature in database
GPG Key ID: 4DE04C198CBA7625

@ -104,11 +104,6 @@ namespace Interpreter
}
}
Interpreter::Interpreter()
: mRunning(false)
{
}
void Interpreter::run(const Type_Code* code, int codeSize, Context& context)
{
assert(codeSize >= 4);

@ -16,17 +16,13 @@ namespace Interpreter
class Interpreter
{
std::stack<Runtime> mCallstack;
bool mRunning;
bool mRunning = false;
Runtime mRuntime;
std::map<int, std::unique_ptr<Opcode1>> mSegment0;
std::map<int, std::unique_ptr<Opcode1>> mSegment2;
std::map<int, std::unique_ptr<Opcode1>> mSegment3;
std::map<int, std::unique_ptr<Opcode0>> 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 <typename T, typename... TArgs>
void installSegment0(int code, TArgs&&... args)

Loading…
Cancel
Save