mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Adding fixes for signedness conversion warnings in libyul
Co-authored-by: Kamil Śliwak <kamil.sliwak@codepoets.it>
This commit is contained in:
co-authored by
Kamil Śliwak
parent
21a9d3dd21
commit
33e7b24df0
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user