summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/classdef.cpp7
-rw-r--r--src/doxygen.cpp1
2 files changed, 5 insertions, 3 deletions
diff --git a/src/classdef.cpp b/src/classdef.cpp
index a1c9287..d4c14d6 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -4046,8 +4046,11 @@ ClassDef *ClassDefImpl::insertTemplateInstance(const QCString &fileName,
{
Debug::print(Debug::Classes,0," New template instance class '%s''%s'\n",qPrint(name()),qPrint(templSpec));
QCString tcname = removeRedundantWhiteSpace(localName()+templSpec);
- templateClass = new ClassDefImpl(
- fileName,startLine,startColumn,tcname,ClassDef::Class);
+ templateClass =
+ toClassDefMutable(
+ Doxygen::classLinkedMap->add(tcname,
+ std::unique_ptr<ClassDef>(
+ new ClassDefImpl(fileName,startLine,startColumn,tcname,ClassDef::Class))));
templateClass->setTemplateMaster(this);
templateClass->setOuterScope(getOuterScope());
templateClass->setHidden(isHidden());
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 52cd4ac..64e5ac3 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -4106,7 +4106,6 @@ static bool findTemplateInstanceRelation(const Entry *root,
if (freshInstance)
{
Debug::print(Debug::Classes,0," found fresh instance '%s'!\n",qPrint(instanceClass->name()));
- Doxygen::classLinkedMap->add(instanceClass->name(),std::unique_ptr<ClassDef>(instanceClass));
instanceClass->setTemplateBaseClassNames(templateNames);
// search for new template instances caused by base classes of