Remove inconsistently used isValidUTF8 helper

This commit is contained in:
Alex Beregszaszi 2020-07-14 15:08:23 +01:00
parent 5bfcc1ffcc
commit 6fe8e63eee
2 changed files with 1 additions and 8 deletions

View File

@ -1408,7 +1408,7 @@ BoolResult StringLiteralType::isImplicitlyConvertibleTo(Type const& _convertTo)
return
arrayType->isByteArray() &&
!(arrayType->dataStoredIn(DataLocation::Storage) && arrayType->isPointer()) &&
!(arrayType->isString() && !isValidUTF8());
!(arrayType->isString() && !util::validateUTF8(value()));
else
return false;
}
@ -1442,11 +1442,6 @@ TypePointer StringLiteralType::mobileType() const
return TypeProvider::stringMemory();
}
bool StringLiteralType::isValidUTF8() const
{
return util::validateUTF8(m_value);
}
FixedBytesType::FixedBytesType(unsigned _bytes): m_bytes(_bytes)
{
solAssert(

View File

@ -629,8 +629,6 @@ public:
std::string toString(bool) const override;
TypePointer mobileType() const override;
bool isValidUTF8() const;
std::string const& value() const { return m_value; }
protected: