mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Replacing StaticStringType with FixedBytesType
This commit is contained in:
+4
-3
@@ -177,8 +177,9 @@ void CompilerUtils::computeHashStatic(Type const& _type, bool _padToWordBoundari
|
||||
|
||||
unsigned CompilerUtils::loadFromMemoryHelper(Type const& _type, bool _fromCalldata, bool _padToWordBoundaries)
|
||||
{
|
||||
unsigned numBytes = _type.getCalldataEncodedSize(_padToWordBoundaries);
|
||||
bool leftAligned = _type.getCategory() == Type::Category::String;
|
||||
unsigned _encodedSize = _type.getCalldataEncodedSize();
|
||||
unsigned numBytes = _padToWordBoundaries ? getPaddedSize(_encodedSize) : _encodedSize;
|
||||
bool leftAligned = _type.getCategory() == Type::Category::FixedBytes;
|
||||
if (numBytes == 0)
|
||||
m_context << eth::Instruction::POP << u256(0);
|
||||
else
|
||||
@@ -202,7 +203,7 @@ unsigned CompilerUtils::loadFromMemoryHelper(Type const& _type, bool _fromCallda
|
||||
unsigned CompilerUtils::prepareMemoryStore(Type const& _type, bool _padToWordBoundaries) const
|
||||
{
|
||||
unsigned numBytes = _type.getCalldataEncodedSize(_padToWordBoundaries);
|
||||
bool leftAligned = _type.getCategory() == Type::Category::String;
|
||||
bool leftAligned = _type.getCategory() == Type::Category::FixedBytes;
|
||||
if (numBytes == 0)
|
||||
m_context << eth::Instruction::POP;
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user