mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix style of "const".
This commit is contained in:
@@ -1380,7 +1380,7 @@ string StringLiteralType::richIdentifier() const
|
||||
return "t_stringliteral_" + toHex(keccak256(m_value).asBytes());
|
||||
}
|
||||
|
||||
bool StringLiteralType::operator==(const Type& _other) const
|
||||
bool StringLiteralType::operator==(Type const& _other) const
|
||||
{
|
||||
if (_other.category() != category())
|
||||
return false;
|
||||
@@ -1463,7 +1463,7 @@ TypeResult FixedBytesType::binaryOperatorResult(Token _operator, TypePointer con
|
||||
return TypePointer();
|
||||
}
|
||||
|
||||
MemberList::MemberMap FixedBytesType::nativeMembers(const ContractDefinition*) const
|
||||
MemberList::MemberMap FixedBytesType::nativeMembers(ContractDefinition const*) const
|
||||
{
|
||||
return MemberList::MemberMap{MemberList::Member{"length", make_shared<IntegerType>(8)}};
|
||||
}
|
||||
@@ -1611,7 +1611,7 @@ string ReferenceType::identifierLocationSuffix() const
|
||||
return id;
|
||||
}
|
||||
|
||||
BoolResult ArrayType::isImplicitlyConvertibleTo(const Type& _convertTo) const
|
||||
BoolResult ArrayType::isImplicitlyConvertibleTo(Type const& _convertTo) const
|
||||
{
|
||||
if (_convertTo.category() != category())
|
||||
return false;
|
||||
@@ -1651,7 +1651,7 @@ BoolResult ArrayType::isImplicitlyConvertibleTo(const Type& _convertTo) const
|
||||
}
|
||||
}
|
||||
|
||||
BoolResult ArrayType::isExplicitlyConvertibleTo(const Type& _convertTo) const
|
||||
BoolResult ArrayType::isExplicitlyConvertibleTo(Type const& _convertTo) const
|
||||
{
|
||||
if (isImplicitlyConvertibleTo(_convertTo))
|
||||
return true;
|
||||
@@ -2010,7 +2010,7 @@ vector<tuple<VariableDeclaration const*, u256, unsigned>> ContractType::stateVar
|
||||
return variablesAndOffsets;
|
||||
}
|
||||
|
||||
BoolResult StructType::isImplicitlyConvertibleTo(const Type& _convertTo) const
|
||||
BoolResult StructType::isImplicitlyConvertibleTo(Type const& _convertTo) const
|
||||
{
|
||||
if (_convertTo.category() != category())
|
||||
return false;
|
||||
@@ -3298,7 +3298,7 @@ MemberList::MemberMap TypeType::nativeMembers(ContractDefinition const* _current
|
||||
return members;
|
||||
}
|
||||
|
||||
ModifierType::ModifierType(const ModifierDefinition& _modifier)
|
||||
ModifierType::ModifierType(ModifierDefinition const& _modifier)
|
||||
{
|
||||
TypePointers params;
|
||||
params.reserve(_modifier.parameters().size());
|
||||
|
||||
@@ -707,7 +707,7 @@ public:
|
||||
BoolResult isImplicitlyConvertibleTo(Type const& _convertTo) const override;
|
||||
BoolResult isExplicitlyConvertibleTo(Type const& _convertTo) const override;
|
||||
std::string richIdentifier() const override;
|
||||
bool operator==(const Type& _other) const override;
|
||||
bool operator==(Type const& _other) const override;
|
||||
unsigned calldataEncodedSize(bool _padded) const override;
|
||||
bool isDynamicallySized() const override { return m_hasDynamicLength; }
|
||||
bool isDynamicallyEncoded() const override;
|
||||
@@ -823,7 +823,7 @@ public:
|
||||
Category category() const override { return Category::Struct; }
|
||||
explicit StructType(StructDefinition const& _struct, DataLocation _location = DataLocation::Storage):
|
||||
ReferenceType(_location), m_struct(_struct) {}
|
||||
BoolResult isImplicitlyConvertibleTo(const Type& _convertTo) const override;
|
||||
BoolResult isImplicitlyConvertibleTo(Type const& _convertTo) const override;
|
||||
std::string richIdentifier() const override;
|
||||
bool operator==(Type const& _other) const override;
|
||||
unsigned calldataEncodedSize(bool _padded) const override;
|
||||
|
||||
@@ -1262,7 +1262,7 @@ string ABIFunctions::abiDecodingFunction(Type const& _type, bool _fromMemory, bo
|
||||
return abiDecodingFunctionValueType(_type, _fromMemory);
|
||||
}
|
||||
|
||||
string ABIFunctions::abiDecodingFunctionValueType(const Type& _type, bool _fromMemory)
|
||||
string ABIFunctions::abiDecodingFunctionValueType(Type const& _type, bool _fromMemory)
|
||||
{
|
||||
TypePointer decodingType = _type.decodingType();
|
||||
solAssert(decodingType, "");
|
||||
|
||||
@@ -265,7 +265,7 @@ unsigned CompilerContext::currentToBaseStackOffset(unsigned _offset) const
|
||||
return m_asm->deposit() - _offset - 1;
|
||||
}
|
||||
|
||||
pair<u256, unsigned> CompilerContext::storageLocationOfVariable(const Declaration& _declaration) const
|
||||
pair<u256, unsigned> CompilerContext::storageLocationOfVariable(Declaration const& _declaration) const
|
||||
{
|
||||
auto it = m_stateVariables.find(&_declaration);
|
||||
solAssert(it != m_stateVariables.end(), "Variable not found in storage.");
|
||||
|
||||
@@ -267,7 +267,7 @@ private:
|
||||
std::vector<ContractDefinition const*>::const_iterator _searchStart
|
||||
);
|
||||
/// @returns an iterator to the contract directly above the given contract.
|
||||
std::vector<ContractDefinition const*>::const_iterator superContract(const ContractDefinition &_contract) const;
|
||||
std::vector<ContractDefinition const*>::const_iterator superContract(ContractDefinition const& _contract) const;
|
||||
/// Updates source location set in the assembly.
|
||||
void updateSourceLocation();
|
||||
|
||||
@@ -291,7 +291,7 @@ private:
|
||||
Declaration const* nextFunctionToCompile() const;
|
||||
/// Informs the queue that we are about to compile the given function, i.e. removes
|
||||
/// the function from the queue of functions to compile.
|
||||
void startFunction(const Declaration &_function);
|
||||
void startFunction(Declaration const& _function);
|
||||
|
||||
/// Labels pointing to the entry points of functions.
|
||||
std::map<Declaration const*, eth::AssemblyItem> m_entryLabels;
|
||||
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
void appendStateVariableAccessor(VariableDeclaration const& _varDecl);
|
||||
|
||||
/// Appends code for a Constant State Variable accessor function
|
||||
void appendConstStateVariableAccessor(const VariableDeclaration& _varDecl);
|
||||
void appendConstStateVariableAccessor(VariableDeclaration const& _varDecl);
|
||||
|
||||
private:
|
||||
bool visit(Conditional const& _condition) override;
|
||||
|
||||
Reference in New Issue
Block a user