Replace void cast by maybe_unused

This commit is contained in:
Leonardo Alt
2020-01-09 13:41:30 +01:00
parent 17158995b5
commit a02308cfa5
3 changed files with 4 additions and 6 deletions
+2 -2
View File
@@ -211,7 +211,7 @@ public:
/// Always returns a value greater than zero and throws if the type cannot be encoded in calldata
/// (or is dynamically encoded).
/// If @a _padded then it is assumed that each element is padded to a multiple of 32 bytes.
virtual unsigned calldataEncodedSize(bool _padded) const { (void)_padded; solAssert(false, ""); }
virtual unsigned calldataEncodedSize([[maybe_unused]] bool _padded) const { solAssert(false, ""); }
/// Convenience version of @see calldataEncodedSize(bool)
unsigned calldataEncodedSize() const { return calldataEncodedSize(true); }
/// @returns the distance between two elements of this type in a calldata array, tuple or struct.
@@ -1432,7 +1432,7 @@ public:
BoolResult isImplicitlyConvertibleTo(Type const&) const override { return false; }
BoolResult isExplicitlyConvertibleTo(Type const&) const override { return false; }
TypeResult binaryOperatorResult(Token, Type const*) const override { return nullptr; }
unsigned calldataEncodedSize(bool _padded) const override { (void)_padded; return 32; }
unsigned calldataEncodedSize(bool) const override { return 32; }
bool canBeStored() const override { return false; }
bool canLiveOutsideStorage() const override { return false; }
bool isValueType() const override { return true; }