removed unnecessary extra initialisation
This commit is contained in:
parent
184cab5205
commit
6fe4894c70
@ -33,7 +33,7 @@ std::string interpreter::eval(std::istream& in, bool& done) {
|
||||
reset();
|
||||
done = false;
|
||||
|
||||
// first pass: read program & resolve labels
|
||||
// first pass: read program & resolve labels, ignore comments
|
||||
for (std::string line; std::getline(in, line);) {
|
||||
if (line[0] == ':') { // check label definition
|
||||
_labels.emplace(line.substr(1), _prog.size());
|
||||
@ -46,7 +46,6 @@ std::string interpreter::eval(std::istream& in, bool& done) {
|
||||
}
|
||||
|
||||
// second pass: run program
|
||||
_pc = 0;
|
||||
while (_pc < _prog.size() && !done) {
|
||||
// fetch next instruction
|
||||
std::string code {_prog[_pc]};
|
||||
|
Loading…
x
Reference in New Issue
Block a user