mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
fixed warnings for msvc build
This commit is contained in:
parent
24a2335c01
commit
80eec8b308
@ -53,8 +53,8 @@ void CompilerContext::addAndInitializeVariable(VariableDeclaration const& _decla
|
||||
{
|
||||
addVariable(_declaration);
|
||||
|
||||
unsigned const size = _declaration.getType()->getSizeOnStack();
|
||||
for (unsigned i = 0; i < size; ++i)
|
||||
int const size = _declaration.getType()->getSizeOnStack();
|
||||
for (int i = 0; i < size; ++i)
|
||||
*this << u256(0);
|
||||
m_asm.adjustDeposit(-size);
|
||||
}
|
||||
|
@ -51,10 +51,10 @@ public:
|
||||
|
||||
void adjustStackOffset(int _adjustment) { m_asm.adjustDeposit(_adjustment); }
|
||||
|
||||
bool isMagicGlobal(Declaration const* _declaration) const { return m_magicGlobals.count(_declaration); }
|
||||
bool isFunctionDefinition(Declaration const* _declaration) const { return m_functionEntryLabels.count(_declaration); }
|
||||
bool isMagicGlobal(Declaration const* _declaration) const { return m_magicGlobals.count(_declaration) != 0; }
|
||||
bool isFunctionDefinition(Declaration const* _declaration) const { return m_functionEntryLabels.count(_declaration) != 0; }
|
||||
bool isLocalVariable(Declaration const* _declaration) const;
|
||||
bool isStateVariable(Declaration const* _declaration) const { return m_stateVariables.count(_declaration); }
|
||||
bool isStateVariable(Declaration const* _declaration) const { return m_stateVariables.count(_declaration) != 0; }
|
||||
|
||||
eth::AssemblyItem getFunctionEntryLabel(FunctionDefinition const& _function) const;
|
||||
/// Returns the distance of the given local variable from the top of the local variable stack.
|
||||
|
@ -39,7 +39,7 @@ namespace solidity
|
||||
|
||||
bool CompilerStack::addSource(string const& _name, string const& _content)
|
||||
{
|
||||
bool existed = m_sources.count(_name);
|
||||
bool existed = m_sources.count(_name) != 0;
|
||||
reset(true);
|
||||
m_sources[_name].scanner = make_shared<Scanner>(CharStream(_content), _name);
|
||||
return existed;
|
||||
|
2
Types.h
2
Types.h
@ -178,7 +178,7 @@ public:
|
||||
int getNumBits() const { return m_bits; }
|
||||
bool isHash() const { return m_modifier == Modifier::HASH || m_modifier == Modifier::ADDRESS; }
|
||||
bool isAddress() const { return m_modifier == Modifier::ADDRESS; }
|
||||
int isSigned() const { return m_modifier == Modifier::SIGNED; }
|
||||
bool isSigned() const { return m_modifier == Modifier::SIGNED; }
|
||||
|
||||
static const MemberList AddressMemberList;
|
||||
|
||||
|
6
Utils.h
Normal file → Executable file
6
Utils.h
Normal file → Executable file
@ -45,5 +45,11 @@ inline void solAssertAux(bool _condition, std::string const& _errorDescription,
|
||||
<< ::boost::throw_line(_line));
|
||||
}
|
||||
|
||||
inline void solAssertAux(void const* _pointer, std::string const& _errorDescription, unsigned _line,
|
||||
char const* _file, char const* _function)
|
||||
{
|
||||
solAssertAux(_pointer != nullptr, _errorDescription, _line, _file, _function);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user