diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2018-08-08 23:07:25 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-08 23:07:25 +0800 |
commit | 90627040545f0257b01cc24f95edea1c89cdbbf3 (patch) | |
tree | 2a22ee42a7a2f0a146bc22b47d801f5d63ddca2c /libsolidity/ast | |
parent | efeffa808371b64e6aa7eb5d340baf5989af2cd5 (diff) | |
parent | e902ce1aa02dc5d19cc9dd231fa538646884826d (diff) | |
download | dexon-solidity-90627040545f0257b01cc24f95edea1c89cdbbf3.tar dexon-solidity-90627040545f0257b01cc24f95edea1c89cdbbf3.tar.gz dexon-solidity-90627040545f0257b01cc24f95edea1c89cdbbf3.tar.bz2 dexon-solidity-90627040545f0257b01cc24f95edea1c89cdbbf3.tar.lz dexon-solidity-90627040545f0257b01cc24f95edea1c89cdbbf3.tar.xz dexon-solidity-90627040545f0257b01cc24f95edea1c89cdbbf3.tar.zst dexon-solidity-90627040545f0257b01cc24f95edea1c89cdbbf3.zip |
Merge pull request #4753 from mattaereal/boost-to-string-patch
Replace boost:lexical_cast<std::string> for std::to_string.
Diffstat (limited to 'libsolidity/ast')
-rw-r--r-- | libsolidity/ast/ASTJsonConverter.cpp | 2 | ||||
-rw-r--r-- | libsolidity/ast/Types.cpp | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/libsolidity/ast/ASTJsonConverter.cpp b/libsolidity/ast/ASTJsonConverter.cpp index a8ede66a..72b20b3b 100644 --- a/libsolidity/ast/ASTJsonConverter.cpp +++ b/libsolidity/ast/ASTJsonConverter.cpp @@ -126,7 +126,7 @@ string ASTJsonConverter::sourceLocationToString(SourceLocation const& _location) int length = -1; if (_location.start >= 0 && _location.end >= 0) length = _location.end - _location.start; - return std::to_string(_location.start) + ":" + std::to_string(length) + ":" + std::to_string(sourceIndex); + return to_string(_location.start) + ":" + to_string(length) + ":" + to_string(sourceIndex); } string ASTJsonConverter::namePathToString(std::vector<ASTString> const& _namePath) diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp index 565d197a..349a59d4 100644 --- a/libsolidity/ast/Types.cpp +++ b/libsolidity/ast/Types.cpp @@ -478,7 +478,7 @@ string IntegerType::richIdentifier() const if (isAddress()) return "t_address"; else - return "t_" + string(isSigned() ? "" : "u") + "int" + std::to_string(numBits()); + return "t_" + string(isSigned() ? "" : "u") + "int" + to_string(numBits()); } bool IntegerType::isImplicitlyConvertibleTo(Type const& _convertTo) const @@ -644,7 +644,7 @@ FixedPointType::FixedPointType(unsigned _totalBits, unsigned _fractionalDigits, string FixedPointType::richIdentifier() const { - return "t_" + string(isSigned() ? "" : "u") + "fixed" + std::to_string(m_totalBits) + "x" + std::to_string(m_fractionalDigits); + return "t_" + string(isSigned() ? "" : "u") + "fixed" + to_string(m_totalBits) + "x" + to_string(m_fractionalDigits); } bool FixedPointType::isImplicitlyConvertibleTo(Type const& _convertTo) const @@ -1390,7 +1390,7 @@ MemberList::MemberMap FixedBytesType::nativeMembers(const ContractDefinition*) c string FixedBytesType::richIdentifier() const { - return "t_bytes" + std::to_string(m_bytes); + return "t_bytes" + to_string(m_bytes); } bool FixedBytesType::operator==(Type const& _other) const @@ -1833,7 +1833,7 @@ TypePointer ArrayType::copyForLocation(DataLocation _location, bool _isPointer) string ContractType::richIdentifier() const { - return (m_super ? "t_super" : "t_contract") + parenthesizeUserIdentifier(m_contract.name()) + std::to_string(m_contract.id()); + return (m_super ? "t_super" : "t_contract") + parenthesizeUserIdentifier(m_contract.name()) + to_string(m_contract.id()); } bool ContractType::operator==(Type const& _other) const @@ -1947,7 +1947,7 @@ bool StructType::isImplicitlyConvertibleTo(const Type& _convertTo) const string StructType::richIdentifier() const { - return "t_struct" + parenthesizeUserIdentifier(m_struct.name()) + std::to_string(m_struct.id()) + identifierLocationSuffix(); + return "t_struct" + parenthesizeUserIdentifier(m_struct.name()) + to_string(m_struct.id()) + identifierLocationSuffix(); } bool StructType::operator==(Type const& _other) const @@ -2173,7 +2173,7 @@ TypePointer EnumType::unaryOperatorResult(Token::Value _operator) const string EnumType::richIdentifier() const { - return "t_enum" + parenthesizeUserIdentifier(m_enum.name()) + std::to_string(m_enum.id()); + return "t_enum" + parenthesizeUserIdentifier(m_enum.name()) + to_string(m_enum.id()); } bool EnumType::operator==(Type const& _other) const @@ -3143,7 +3143,7 @@ string ModifierType::toString(bool _short) const string ModuleType::richIdentifier() const { - return "t_module_" + std::to_string(m_sourceUnit.id()); + return "t_module_" + to_string(m_sourceUnit.id()); } bool ModuleType::operator==(Type const& _other) const |