Blame doxygen-1.8.20-broken-ref-for-enum-entry.patch

Than Ngo 6f6455
commit 63dc5b9b1b3e8fb875304a954e4df934b249034b
Than Ngo 6f6455
Author: Dimitri van Heesch <doxygen@gmail.com>
Than Ngo 6f6455
Date:   Wed Aug 26 21:23:29 2020 +0200
Than Ngo 6f6455
Than Ngo 6f6455
    issue #7977: Broken ref for enum entry (doxygen 1.8.18 -> 1.8.19)
Than Ngo 6f6455
Than Ngo 6f6455
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
Than Ngo 6f6455
index 757e7831..d5512925 100644
Than Ngo 6f6455
--- a/src/doxygen.cpp
Than Ngo 6f6455
+++ b/src/doxygen.cpp
Than Ngo 6f6455
@@ -6946,7 +6946,14 @@ static void addEnumValuesToEnums(const Entry *root)
Than Ngo 6f6455
       MemberName *mn = mnsd->find(name); // for all members with this name
Than Ngo 6f6455
       if (mn)
Than Ngo 6f6455
       {
Than Ngo 6f6455
-        std::vector< std::unique_ptr<MemberDef> > extraMembers;
Than Ngo 6f6455
+        struct EnumValueInfo
Than Ngo 6f6455
+        {
Than Ngo 6f6455
+          EnumValueInfo(const QCString &n,std::unique_ptr<MemberDef> &md) :
Than Ngo 6f6455
+            name(n), member(std::move(md)) {}
Than Ngo 6f6455
+          QCString name;
Than Ngo 6f6455
+          std::unique_ptr<MemberDef> member;
Than Ngo 6f6455
+        };
Than Ngo 6f6455
+        std::vector< EnumValueInfo > extraMembers;
Than Ngo 6f6455
         // for each enum in this list
Than Ngo 6f6455
         for (const auto &md : *mn)
Than Ngo 6f6455
         {
Than Ngo 6f6455
@@ -7006,8 +7013,7 @@ static void addEnumValuesToEnums(const Entry *root)
Than Ngo 6f6455
                   fmd->setAnchor();
Than Ngo 6f6455
                   md->insertEnumField(fmd.get());
Than Ngo 6f6455
                   fmd->setEnumScope(md.get(),TRUE);
Than Ngo 6f6455
-                  mn=mnsd->add(e->name);
Than Ngo 6f6455
-                  extraMembers.push_back(std::move(fmd));
Than Ngo 6f6455
+                  extraMembers.push_back(EnumValueInfo(e->name,fmd));
Than Ngo 6f6455
                 }
Than Ngo 6f6455
               }
Than Ngo 6f6455
               else
Than Ngo 6f6455
@@ -7071,9 +7077,10 @@ static void addEnumValuesToEnums(const Entry *root)
Than Ngo 6f6455
           }
Than Ngo 6f6455
         }
Than Ngo 6f6455
         // move the newly added members into mn
Than Ngo 6f6455
-        for (auto &md : extraMembers)
Than Ngo 6f6455
+        for (auto &e : extraMembers)
Than Ngo 6f6455
         {
Than Ngo 6f6455
-          mn->push_back(std::move(md));
Than Ngo 6f6455
+          MemberName *emn=mnsd->add(e.name);
Than Ngo 6f6455
+          emn->push_back(std::move(e.member));
Than Ngo 6f6455
         }
Than Ngo 6f6455
       }
Than Ngo 6f6455
     }