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 size_type = string::size_type;
|
||||||
using diff_type = string::difference_type;
|
using diff_type = string::difference_type;
|
||||||
size_type searchPosition = min<size_type>(m_source.size(), size_type(_position));
|
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;
|
size_type lineStart;
|
||||||
if (searchPosition == 0)
|
if (searchPosition == 0)
|
||||||
lineStart = 0;
|
lineStart = 0;
|
||||||
|
@ -179,7 +179,7 @@ bool Scanner::scanHexByte(char& o_scannedByte)
|
|||||||
rollback(i);
|
rollback(i);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
x = x * 16 + d;
|
x = static_cast<char>(x * 16 + d);
|
||||||
advance();
|
advance();
|
||||||
}
|
}
|
||||||
o_scannedByte = x;
|
o_scannedByte = x;
|
||||||
@ -197,7 +197,7 @@ std::optional<unsigned> Scanner::scanUnicode()
|
|||||||
rollback(i);
|
rollback(i);
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
x = x * 16 + static_cast<size_t>(d);
|
x = x * 16 + static_cast<unsigned>(d);
|
||||||
advance();
|
advance();
|
||||||
}
|
}
|
||||||
return x;
|
return x;
|
||||||
|
Loading…
Reference in New Issue
Block a user