mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Remove inconsistently used isValidUTF8 helper
This commit is contained in:
parent
5bfcc1ffcc
commit
6fe8e63eee
@ -1408,7 +1408,7 @@ BoolResult StringLiteralType::isImplicitlyConvertibleTo(Type const& _convertTo)
|
|||||||
return
|
return
|
||||||
arrayType->isByteArray() &&
|
arrayType->isByteArray() &&
|
||||||
!(arrayType->dataStoredIn(DataLocation::Storage) && arrayType->isPointer()) &&
|
!(arrayType->dataStoredIn(DataLocation::Storage) && arrayType->isPointer()) &&
|
||||||
!(arrayType->isString() && !isValidUTF8());
|
!(arrayType->isString() && !util::validateUTF8(value()));
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -1442,11 +1442,6 @@ TypePointer StringLiteralType::mobileType() const
|
|||||||
return TypeProvider::stringMemory();
|
return TypeProvider::stringMemory();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool StringLiteralType::isValidUTF8() const
|
|
||||||
{
|
|
||||||
return util::validateUTF8(m_value);
|
|
||||||
}
|
|
||||||
|
|
||||||
FixedBytesType::FixedBytesType(unsigned _bytes): m_bytes(_bytes)
|
FixedBytesType::FixedBytesType(unsigned _bytes): m_bytes(_bytes)
|
||||||
{
|
{
|
||||||
solAssert(
|
solAssert(
|
||||||
|
@ -629,8 +629,6 @@ public:
|
|||||||
std::string toString(bool) const override;
|
std::string toString(bool) const override;
|
||||||
TypePointer mobileType() const override;
|
TypePointer mobileType() const override;
|
||||||
|
|
||||||
bool isValidUTF8() const;
|
|
||||||
|
|
||||||
std::string const& value() const { return m_value; }
|
std::string const& value() const { return m_value; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
Loading…
Reference in New Issue
Block a user