Merge pull request #13240 from derekg/test-fix

Fix C++ compilation errors on 32-bit Raspbian due to `unsigned` -> `int` conversion
This commit is contained in:
Kamil Śliwak 2022-07-04 22:08:06 +02:00 committed by GitHub
commit a53f15f45f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -136,7 +136,7 @@ private:
}
bytes readBytes(unsigned length)
{
bytes ret{m_metadata.begin() + m_pos, m_metadata.begin() + m_pos + length};
bytes ret{m_metadata.begin() + static_cast<int>(m_pos), m_metadata.begin() + static_cast<int>(m_pos + length)};
m_pos += length;
return ret;
}

View File

@ -141,7 +141,7 @@ namespace
ControlFlowGraph cfg(output);
AssemblyItems optItems;
for (BasicBlock const& block: cfg.optimisedBlocks())
copy(output.begin() + block.begin, output.begin() + block.end,
copy(output.begin() + static_cast<int>(block.begin), output.begin() + static_cast<int>(block.end),
back_inserter(optItems));
output = move(optItems);
}

View File

@ -98,7 +98,7 @@ private:
void advance(unsigned n = 1)
{
solAssert(m_char != m_source.end(), "Cannot advance beyond end.");
m_char = std::next(m_char, n);
m_char = std::next(m_char, static_cast<int>(n));
}
/// Returns the current character or '\0' if at end of input.