Skip to content

Commit

Permalink
Remove unused function smallestTypeForLiteral
Browse files Browse the repository at this point in the history
  • Loading branch information
axic committed Apr 30, 2018
1 parent c44294d commit 548bf2f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
7 changes: 0 additions & 7 deletions libsolidity/ast/Types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1274,13 +1274,6 @@ bool StringLiteralType::isValidUTF8() const
return dev::validateUTF8(m_value);
}

shared_ptr<FixedBytesType> FixedBytesType::smallestTypeForLiteral(string const& _literal)
{
if (_literal.length() <= 32)
return make_shared<FixedBytesType>(_literal.length());
return shared_ptr<FixedBytesType>();
}

FixedBytesType::FixedBytesType(int _bytes): m_bytes(_bytes)
{
solAssert(
Expand Down
4 changes: 0 additions & 4 deletions libsolidity/ast/Types.h
Original file line number Diff line number Diff line change
Expand Up @@ -502,10 +502,6 @@ class FixedBytesType: public Type
public:
virtual Category category() const override { return Category::FixedBytes; }

/// @returns the smallest bytes type for the given literal or an empty pointer
/// if no type fits.
static std::shared_ptr<FixedBytesType> smallestTypeForLiteral(std::string const& _literal);

explicit FixedBytesType(int _bytes);

virtual bool isImplicitlyConvertibleTo(Type const& _convertTo) const override;
Expand Down

0 comments on commit 548bf2f

Please sign in to comment.