summaryrefslogtreecommitdiffstats
path: root/src/code.l
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2020-09-05 17:33:50 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2020-09-05 17:33:50 (GMT)
commit214b94e3568867344b87c4266cb96d3f0dfe828a (patch)
treeeb14668aa641cb5ad823303c370a53a88e981560 /src/code.l
parent0aaa71ab96fe055fe08567bea9cc59a6e33b7bb4 (diff)
downloadDoxygen-214b94e3568867344b87c4266cb96d3f0dfe828a.zip
Doxygen-214b94e3568867344b87c4266cb96d3f0dfe828a.tar.gz
Doxygen-214b94e3568867344b87c4266cb96d3f0dfe828a.tar.bz2
Compilation fixes for code.l
Diffstat (limited to 'src/code.l')
-rw-r--r--src/code.l13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/code.l b/src/code.l
index c2b3a93..9889d56 100644
--- a/src/code.l
+++ b/src/code.l
@@ -862,9 +862,10 @@ NUMBER {INTEGER_NUMBER}|{FLOAT_NUMBER}
if (getResolvedClass(yyextra->currentDefinition,yyextra->sourceFileDef,yyextra->curClassName)==0)
{
DBG_CTX((stderr,"Adding new class %s\n",yyextra->curClassName.data()));
- std::unique_ptr<ClassDef> ncd { createClassDef("<code>",1,1,
+ std::unique_ptr<ClassDef> ncd_p { createClassDef("<code>",1,1,
yyextra->curClassName,ClassDef::Class,0,0,FALSE) };
- yyextra->codeClassMap.emplace(std::make_pair(yyextra->curClassName.str(),std::move(ncd)));
+ ClassDef *ncd = ncd_p.get();
+ yyextra->codeClassMap.emplace(std::make_pair(yyextra->curClassName.str(),std::move(ncd_p)));
// insert base classes.
char *s=yyextra->curClassBases.first();
while (s)
@@ -876,7 +877,7 @@ NUMBER {INTEGER_NUMBER}|{FLOAT_NUMBER}
bcd=it->second.get();
}
if (bcd==0) bcd=getResolvedClass(yyextra->currentDefinition,yyextra->sourceFileDef,s);
- if (bcd && bcd!=ncd.get())
+ if (bcd && bcd!=ncd)
{
ncd->insertBaseClass(const_cast<ClassDef*>(bcd),s,Public,Normal);
}
@@ -2330,7 +2331,7 @@ void VariableContext::addVariable(yyscan_t yyscanner,const QCString &type,const
{
// probably a template class
QCString typeName(ltype.left(i));
- ClassDef* newDef = 0;
+ const ClassDef* newDef = 0;
QCString templateArgs(ltype.right(ltype.length() - i));
it = yyextra->codeClassMap.find(typeName.str());
if (!typeName.isEmpty())
@@ -3966,7 +3967,7 @@ void CCodeParser::resetCodeParserState()
//printf("***CodeParser::reset()\n");
yyextra->forceTagReference.resize(0);
yyextra->theVarContext.clear();
- yyextra->classScopeLengthStack = {};
+ while (!yyextra->classScopeLengthStack.empty()) yyextra->classScopeLengthStack.pop();
yyextra->codeClassMap.clear();
yyextra->curClassBases.clear();
yyextra->anchorCount = 0;
@@ -4013,7 +4014,7 @@ void CCodeParser::parseCode(CodeOutputInterface &od,const char *className,const
yyextra->sharpCount = 0;
yyextra->insideTemplate = FALSE;
yyextra->theCallContext.clear();
- yyextra->scopeStack = {};
+ while (!yyextra->scopeStack.empty()) yyextra->scopeStack.pop();
yyextra->classScope = className;
//printf("parseCCode %s\n",className);
yyextra->exampleBlock = exBlock;