Skip to content

Commit

Permalink
AURORA: Use the proper reverse_iterator class
Browse files Browse the repository at this point in the history
When calling rbegin() on a non-const container, it returns a non-const iterator. Since the spec does not require reverse_iterator<iterator> and reverse_iterator<const_iterator> to be comparable, this breaks compilation on some compilers.
  • Loading branch information
clone2727 committed Jul 7, 2013
1 parent 0b5aec3 commit b9b8625
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/aurora/nwscript/ncsfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1313,7 +1313,7 @@ void NCSFile::o_destruct(InstructionType type) {
stackSize -= 4;
}

for (std::vector<Variable>::const_reverse_iterator t = tmp.rbegin(); t != tmp.rend(); ++t)
for (std::vector<Variable>::reverse_iterator t = tmp.rbegin(); t != tmp.rend(); ++t)
_stack.push(*t);
}

Expand Down

0 comments on commit b9b8625

Please sign in to comment.