diff --git a/libdevcore/Whiskers.h b/libdevcore/Whiskers.h index ebe17b51c..5d326bf02 100644 --- a/libdevcore/Whiskers.h +++ b/libdevcore/Whiskers.h @@ -85,6 +85,8 @@ public: std::string render() const; private: + // Prevent implicit cast to bool + Whiskers& operator()(std::string _parameter, long long); void checkParameterValid(std::string const& _parameter) const; void checkParameterUnknown(std::string const& _parameter) const; diff --git a/libsolidity/codegen/YulUtilFunctions.cpp b/libsolidity/codegen/YulUtilFunctions.cpp index 13e410a74..c8b2e2d03 100644 --- a/libsolidity/codegen/YulUtilFunctions.cpp +++ b/libsolidity/codegen/YulUtilFunctions.cpp @@ -655,7 +655,7 @@ string YulUtilFunctions::arrayConvertLengthToSize(ArrayType const& _type) })") ("functionName", functionName) - ("elementSize", _type.location() == DataLocation::Memory ? baseType.memoryHeadSize() : baseType.calldataEncodedSize()) + ("elementSize", to_string(_type.location() == DataLocation::Memory ? baseType.memoryHeadSize() : baseType.calldataEncodedSize())) ("byteArray", _type.isByteArray()) ("mul", overflowCheckedIntMulFunction(*TypeProvider::uint256())) .render();