fix test w/ signed issues

This commit is contained in:
Derek Gottfrid 2022-07-03 16:33:22 -04:00
parent 5de5120497
commit 3f62ab069c
3 changed files with 3 additions and 3 deletions

View File

@ -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;
} }

View File

@ -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);
} }

View File

@ -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.