From 68cf1bf37dc0287b8313aa65ae07624e5d81bde2 Mon Sep 17 00:00:00 2001 From: Lefteris Karapetsas Date: Fri, 13 Feb 2015 23:26:03 +0100 Subject: Small improvement in TypeType::getMembers() --- Types.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Types.cpp') diff --git a/Types.cpp b/Types.cpp index c29873b1..5d753645 100644 --- a/Types.cpp +++ b/Types.cpp @@ -966,9 +966,9 @@ MemberList const& TypeType::getMembers() const else if (m_actualType->getCategory() == Category::Enum) { EnumDefinition const& enumDef = dynamic_cast(*m_actualType).getEnumDefinition(); + auto enumType = make_shared(enumDef); for (ASTPointer const& enumValue: enumDef.getMembers()) - members.insert(make_pair(enumValue->getName(), make_shared(enumDef))); - m_members.reset(new MemberList(members)); + members.insert(make_pair(enumValue->getName(), enumType)); } m_members.reset(new MemberList(members)); } -- cgit