mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
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:
commit
a53f15f45f
@ -136,7 +136,7 @@ private:
|
|||||||
}
|
}
|
||||||
bytes readBytes(unsigned length)
|
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;
|
m_pos += length;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -141,7 +141,7 @@ namespace
|
|||||||
ControlFlowGraph cfg(output);
|
ControlFlowGraph cfg(output);
|
||||||
AssemblyItems optItems;
|
AssemblyItems optItems;
|
||||||
for (BasicBlock const& block: cfg.optimisedBlocks())
|
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));
|
back_inserter(optItems));
|
||||||
output = move(optItems);
|
output = move(optItems);
|
||||||
}
|
}
|
||||||
|
@ -98,7 +98,7 @@ private:
|
|||||||
void advance(unsigned n = 1)
|
void advance(unsigned n = 1)
|
||||||
{
|
{
|
||||||
solAssert(m_char != m_source.end(), "Cannot advance beyond end.");
|
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.
|
/// Returns the current character or '\0' if at end of input.
|
||||||
|
Loading…
Reference in New Issue
Block a user