More range-based loops and overrides

This commit is contained in:
Tillmann Karras
2014-03-11 06:55:00 +01:00
parent 3fc9ca0789
commit 2fcaca0603
18 changed files with 110 additions and 127 deletions

View File

@ -283,13 +283,10 @@ bool RunCode(const ARCode &arcode)
LogInfo("Code Name: %s", arcode.name.c_str());
LogInfo("Number of codes: %i", arcode.ops.size());
std::vector<AREntry>::const_iterator
iter = arcode.ops.begin(),
ops_end = arcode.ops.end();
for (; iter != ops_end; ++iter)
for (const AREntry& entry : arcode.ops)
{
const ARAddr& addr = *(ARAddr*)&iter->cmd_addr;
const u32 data = iter->value;
const ARAddr& addr = *(ARAddr*)&entry.cmd_addr;
const u32 data = entry.value;
// after a conditional code, skip lines if needed
if (skip_count)