Adding fixes for signedness conversion warnings in libyul

Co-authored-by: Kamil Śliwak <kamil.sliwak@codepoets.it>
This commit is contained in:
Djordje Mijovic
2020-06-12 10:39:30 +02:00
co-authored by Kamil Śliwak
parent 21a9d3dd21
commit 33e7b24df0
15 changed files with 78 additions and 68 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ string solidity::yul::reindent(string const& _code)
auto const static countBraces = [](string const& _s) noexcept -> int
{
auto const i = _s.find("//");
auto const e = i == _s.npos ? end(_s) : next(begin(_s), i);
auto const e = i == _s.npos ? end(_s) : next(begin(_s), static_cast<ptrdiff_t>(i));
auto const opening = count_if(begin(_s), e, [](auto ch) { return ch == '{' || ch == '('; });
auto const closing = count_if(begin(_s), e, [](auto ch) { return ch == '}' || ch == ')'; });
return opening - closing;