diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2016-11-26 23:23:32 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2016-11-29 06:27:55 +0800 |
commit | c01426efecb82375c7c732f8c385b38cb9259168 (patch) | |
tree | f8e576715c19d5ee8b673b39653b8beb9428798e /libsolidity | |
parent | dadb4818ba230de02061ffd31ed71a0dec154885 (diff) | |
download | dexon-solidity-c01426efecb82375c7c732f8c385b38cb9259168.tar dexon-solidity-c01426efecb82375c7c732f8c385b38cb9259168.tar.gz dexon-solidity-c01426efecb82375c7c732f8c385b38cb9259168.tar.bz2 dexon-solidity-c01426efecb82375c7c732f8c385b38cb9259168.tar.lz dexon-solidity-c01426efecb82375c7c732f8c385b38cb9259168.tar.xz dexon-solidity-c01426efecb82375c7c732f8c385b38cb9259168.tar.zst dexon-solidity-c01426efecb82375c7c732f8c385b38cb9259168.zip |
Make position optional in dev::validate
Diffstat (limited to 'libsolidity')
-rw-r--r-- | libsolidity/ast/ASTJsonConverter.cpp | 3 | ||||
-rw-r--r-- | libsolidity/ast/Types.cpp | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/libsolidity/ast/ASTJsonConverter.cpp b/libsolidity/ast/ASTJsonConverter.cpp index 030b32ba..cf60c76a 100644 --- a/libsolidity/ast/ASTJsonConverter.cpp +++ b/libsolidity/ast/ASTJsonConverter.cpp @@ -417,9 +417,8 @@ bool ASTJsonConverter::visit(ElementaryTypeNameExpression const& _node) bool ASTJsonConverter::visit(Literal const& _node) { char const* tokenString = Token::toString(_node.token()); - size_t invalidPos = 0; Json::Value value{_node.value()}; - if (!dev::validate(_node.value(), invalidPos)) + if (!dev::validate(_node.value())) value = Json::nullValue; Token::Value subdenomination = Token::Value(_node.subDenomination()); addJsonNode(_node, "Literal", { diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp index b22f3c08..4c8463b5 100644 --- a/libsolidity/ast/Types.cpp +++ b/libsolidity/ast/Types.cpp @@ -909,8 +909,7 @@ TypePointer StringLiteralType::mobileType() const bool StringLiteralType::isValidUTF8() const { - size_t dontCare {}; - return dev::validate(m_value, dontCare); + return dev::validate(m_value); } shared_ptr<FixedBytesType> FixedBytesType::smallestTypeForLiteral(string const& _literal) |