From 63dc5b9b1b3e8fb875304a954e4df934b249034b Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Wed, 26 Aug 2020 21:23:29 +0200 Subject: issue #7977: Broken ref for enum entry (doxygen 1.8.18 -> 1.8.19) --- src/doxygen.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 757e783..d551292 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -6946,7 +6946,14 @@ static void addEnumValuesToEnums(const Entry *root) MemberName *mn = mnsd->find(name); // for all members with this name if (mn) { - std::vector< std::unique_ptr > extraMembers; + struct EnumValueInfo + { + EnumValueInfo(const QCString &n,std::unique_ptr &md) : + name(n), member(std::move(md)) {} + QCString name; + std::unique_ptr member; + }; + std::vector< EnumValueInfo > extraMembers; // for each enum in this list for (const auto &md : *mn) { @@ -7006,8 +7013,7 @@ static void addEnumValuesToEnums(const Entry *root) fmd->setAnchor(); md->insertEnumField(fmd.get()); fmd->setEnumScope(md.get(),TRUE); - mn=mnsd->add(e->name); - extraMembers.push_back(std::move(fmd)); + extraMembers.push_back(EnumValueInfo(e->name,fmd)); } } else @@ -7071,9 +7077,10 @@ static void addEnumValuesToEnums(const Entry *root) } } // move the newly added members into mn - for (auto &md : extraMembers) + for (auto &e : extraMembers) { - mn->push_back(std::move(md)); + MemberName *emn=mnsd->add(e.name); + emn->push_back(std::move(e.member)); } } } -- cgit v0.12