Browse Source

More style changes in enums

cl-refactor
Lefteris Karapetsas 10 years ago
parent
commit
e296d86cc6
  1. 2
      libsolidity/AST.cpp
  2. 10
      libsolidity/AST.h
  3. 10
      libsolidity/Types.cpp

2
libsolidity/AST.cpp

@ -602,7 +602,7 @@ Literal::Literal(Location const& _location, Token::Value _token,
if (Token::isEtherSubdenomination(_sub)) if (Token::isEtherSubdenomination(_sub))
m_subDenomination = static_cast<Literal::SubDenomination>(_sub); m_subDenomination = static_cast<Literal::SubDenomination>(_sub);
else else
m_subDenomination = Literal::SubDenomination::NONE; m_subDenomination = Literal::SubDenomination::None;
} }
void Literal::checkTypeRequirements() void Literal::checkTypeRequirements()

10
libsolidity/AST.h

@ -1119,11 +1119,11 @@ class Literal: public PrimaryExpression
public: public:
enum class SubDenomination enum class SubDenomination
{ {
NONE = Token::ILLEGAL, None = Token::ILLEGAL,
WEI = Token::SubWei, Wei = Token::SubWei,
SZABO = Token::SubSzabo, Szabo = Token::SubSzabo,
FINNEY = Token::SubFinney, Finney = Token::SubFinney,
ETHER = Token::SubEther Ether = Token::SubEther
}; };
Literal(Location const& _location, Token::Value _token, Literal(Location const& _location, Token::Value _token,
ASTPointer<ASTString> const& _value, ASTPointer<ASTString> const& _value,

10
libsolidity/Types.cpp

@ -343,16 +343,16 @@ u256 IntegerConstantType::literalValue(Literal const* _literal) const
Literal::SubDenomination sub =_literal->getSubDenomination(); Literal::SubDenomination sub =_literal->getSubDenomination();
switch(sub) switch(sub)
{ {
case Literal::SubDenomination::WEI: case Literal::SubDenomination::Wei:
case Literal::SubDenomination::NONE: case Literal::SubDenomination::None:
break; break;
case Literal::SubDenomination::SZABO: case Literal::SubDenomination::Szabo:
value *= u256(1000000000000); value *= u256(1000000000000);
break; break;
case Literal::SubDenomination::FINNEY: case Literal::SubDenomination::Finney:
value *= u256(1000000000000000); value *= u256(1000000000000000);
break; break;
case Literal::SubDenomination::ETHER: case Literal::SubDenomination::Ether:
value *= u256(1000000000000000000); value *= u256(1000000000000000000);
break; break;
} }

Loading…
Cancel
Save