1
0
mirror of https://github.com/aportelli/LatAnalyze.git synced 2025-04-11 03:20:46 +01:00

minor code cleaning

This commit is contained in:
Antonin Portelli 2013-09-28 19:04:15 +01:00
parent 2efc4ef6c5
commit 76f5423beb
2 changed files with 5 additions and 2 deletions

View File

@ -85,6 +85,9 @@ MathParserState::~MathParserState(void)
#define CODE_WIDTH 6 #define CODE_WIDTH 6
#define CODE_MOD setw(CODE_WIDTH) << left #define CODE_MOD setw(CODE_WIDTH) << left
Instruction::~Instruction(void)
{}
void Instruction::Print(std::ostream &out) const void Instruction::Print(std::ostream &out) const
{ {
out << CODE_MOD << "<null>" << CODE_MOD << "ABSTRACT INSTRUCTION!"; out << CODE_MOD << "<null>" << CODE_MOD << "ABSTRACT INSTRUCTION!";

View File

@ -63,7 +63,7 @@ private:
}; };
/****************************************************************************** /******************************************************************************
* Virtual machine classes * * Virtual machine code classes *
******************************************************************************/ ******************************************************************************/
typedef std::map<std::string,double> VarTable; typedef std::map<std::string,double> VarTable;
@ -71,7 +71,7 @@ typedef std::map<std::string,double> VarTable;
class Instruction class Instruction
{ {
public: public:
virtual ~Instruction() {}; virtual ~Instruction();
// instruction execution // instruction execution
virtual void operator()(std::stack<double>& dstack, VarTable& vtable) = 0; virtual void operator()(std::stack<double>& dstack, VarTable& vtable) = 0;
friend std::ostream& operator<<(std::ostream& out, const Instruction& ins); friend std::ostream& operator<<(std::ostream& out, const Instruction& ins);