mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fixing liblangutil conversion warnings
This commit is contained in:
parent
18a196c21d
commit
731b2efc97
@ -107,7 +107,7 @@ tuple<int, int> CharStream::translatePositionToLineColumn(int _position) const
|
||||
using size_type = string::size_type;
|
||||
using diff_type = string::difference_type;
|
||||
size_type searchPosition = min<size_type>(m_source.size(), size_type(_position));
|
||||
int lineNumber = count(m_source.begin(), m_source.begin() + diff_type(searchPosition), '\n');
|
||||
int lineNumber = static_cast<int>(count(m_source.begin(), m_source.begin() + diff_type(searchPosition), '\n'));
|
||||
size_type lineStart;
|
||||
if (searchPosition == 0)
|
||||
lineStart = 0;
|
||||
|
@ -179,7 +179,7 @@ bool Scanner::scanHexByte(char& o_scannedByte)
|
||||
rollback(i);
|
||||
return false;
|
||||
}
|
||||
x = x * 16 + d;
|
||||
x = static_cast<char>(x * 16 + d);
|
||||
advance();
|
||||
}
|
||||
o_scannedByte = x;
|
||||
@ -197,7 +197,7 @@ std::optional<unsigned> Scanner::scanUnicode()
|
||||
rollback(i);
|
||||
return {};
|
||||
}
|
||||
x = x * 16 + static_cast<size_t>(d);
|
||||
x = x * 16 + static_cast<unsigned>(d);
|
||||
advance();
|
||||
}
|
||||
return x;
|
||||
|
Loading…
Reference in New Issue
Block a user