mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #12740 from ethereum/remove-locale-dependent-operations
Replace all locale-dependent operations with locale-agnostic counterparts
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#include <libsolutil/CommonIO.h>
|
||||
#include <libsolutil/FunctionSelector.h>
|
||||
#include <libsolutil/Keccak256.h>
|
||||
#include <libsolutil/StringUtils.h>
|
||||
#include <libsolutil/UTF8.h>
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
@@ -781,8 +782,8 @@ tuple<bool, rational> RationalNumberType::parseRational(string const& _value)
|
||||
if (radixPoint != _value.end())
|
||||
{
|
||||
if (
|
||||
!all_of(radixPoint + 1, _value.end(), ::isdigit) ||
|
||||
!all_of(_value.begin(), radixPoint, ::isdigit)
|
||||
!all_of(radixPoint + 1, _value.end(), util::isDigit) ||
|
||||
!all_of(_value.begin(), radixPoint, util::isDigit)
|
||||
)
|
||||
return make_tuple(false, rational(0));
|
||||
|
||||
|
||||
@@ -203,7 +203,7 @@ private:
|
||||
else
|
||||
solAssert(false);
|
||||
|
||||
if (isdigit(value.front()))
|
||||
if (isDigit(value.front()))
|
||||
return yul::Literal{_identifier.debugData, yul::LiteralKind::Number, yul::YulString{value}, {}};
|
||||
else
|
||||
return yul::Identifier{_identifier.debugData, yul::YulString{value}};
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <libsmtutil/CHCSmtLib2Interface.h>
|
||||
#include <liblangutil/CharStreamProvider.h>
|
||||
#include <libsolutil/Algorithms.h>
|
||||
#include <libsolutil/StringUtils.h>
|
||||
|
||||
#ifdef HAVE_Z3_DLOPEN
|
||||
#include <z3_version.h>
|
||||
@@ -1998,9 +1999,9 @@ map<unsigned, vector<unsigned>> CHC::summaryCalls(CHCSolverInterface::CexGraph c
|
||||
// Predicates that do not have a CALLID have a predicate id at the end of <suffix>,
|
||||
// so the assertion below should still hold.
|
||||
auto beg = _s.data();
|
||||
while (beg != _s.data() + _s.size() && !isdigit(*beg)) ++beg;
|
||||
while (beg != _s.data() + _s.size() && !isDigit(*beg)) ++beg;
|
||||
auto end = beg;
|
||||
while (end != _s.data() + _s.size() && isdigit(*end)) ++end;
|
||||
while (end != _s.data() + _s.size() && isDigit(*end)) ++end;
|
||||
|
||||
solAssert(beg != end, "Expected to find numerical call or predicate id.");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user