From fbd39323afbe78a8693bfc2c8c3ffa0f071a2f2a Mon Sep 17 00:00:00 2001 From: Lefteris Karapetsas Date: Fri, 13 Feb 2015 23:03:32 +0100 Subject: Moving getMemberValue from EnumDefinition to EnumType --- ExpressionCompiler.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'ExpressionCompiler.cpp') diff --git a/ExpressionCompiler.cpp b/ExpressionCompiler.cpp index 00c2dafd..63324fe5 100644 --- a/ExpressionCompiler.cpp +++ b/ExpressionCompiler.cpp @@ -492,8 +492,7 @@ void ExpressionCompiler::endVisit(MemberAccess const& _memberAccess) case Type::Category::Enum: { EnumType const& type = dynamic_cast(*_memberAccess.getExpression().getType()); - EnumDefinition const& enumDef = type.getEnumDefinition(); - m_context << enumDef.getMemberValue(_memberAccess.getMemberName()); + m_context << type.getMemberValue(_memberAccess.getMemberName()); break; } case Type::Category::TypeType: @@ -516,8 +515,7 @@ void ExpressionCompiler::endVisit(MemberAccess const& _memberAccess) } else if ((enumType = dynamic_cast(type.getActualType().get()))) { - EnumDefinition const &enumDef = enumType->getEnumDefinition(); - m_context << enumDef.getMemberValue(_memberAccess.getMemberName()); + m_context << enumType->getMemberValue(_memberAccess.getMemberName()); return; } -- cgit