From eace8c9e3ceb14fb80c6f548713624fd743f7276 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Thu, 9 Jan 2020 20:12:05 +0100 Subject: issue #7472: Serious regression: /**< comments cause functions to be silently ignored --- src/entry.cpp | 15 --------------- src/entry.h | 3 --- src/scanner.l | 8 +++----- 3 files changed, 3 insertions(+), 23 deletions(-) diff --git a/src/entry.cpp b/src/entry.cpp index cc8cd1f..a0e616a 100644 --- a/src/entry.cpp +++ b/src/entry.cpp @@ -169,21 +169,6 @@ void Entry::copyToSubEntry(const std::shared_ptr ¤t) m_sublist.push_back(copy); } -void Entry::moveFromSubEntry(const Entry *child,std::shared_ptr &moveTo) -{ - auto it = std::find_if(m_sublist.begin(),m_sublist.end(), - [child](const std::shared_ptr&elem) { return elem.get()==child; }); - if (it!=m_sublist.end()) - { - moveTo = *it; - m_sublist.erase(it); - } - else - { - moveTo.reset(); - } -} - void Entry::removeSubEntry(const Entry *e) { auto it = std::find_if(m_sublist.begin(),m_sublist.end(), diff --git a/src/entry.h b/src/entry.h index 802a212..3cd53e9 100644 --- a/src/entry.h +++ b/src/entry.h @@ -216,9 +216,6 @@ class Entry void moveToSubEntryAndRefresh(Entry* &e); void moveToSubEntryAndRefresh(std::shared_ptr &e); - /*! take \a child of of to list of children and move it into \a moveTo */ - void moveFromSubEntry(const Entry *child,std::shared_ptr &moveTo); - /*! make a copy of \a e and add it as a child to this entry */ void copyToSubEntry (Entry* e); void copyToSubEntry (const std::shared_ptr &e); diff --git a/src/scanner.l b/src/scanner.l index 187a9ff..44c7c78 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -4914,7 +4914,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) } "}"{BN}*("/*!"|"/**"|"//!"|"///")"<" { lineCount(yyscanner); - if ( yyextra->curlyCount ) + if ( yyextra->curlyCount ) { //addToBody(yytext); --yyextra->curlyCount ; @@ -4922,10 +4922,8 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) else { yyextra->current->endBodyLine=yyextra->yyLineNr; - // take yyextra->previous out of yyextra->current_root and move it into yyextra->current - yyextra->tempEntry = yyextra->current; // remember yyextra->current - yyextra->current_root->moveFromSubEntry(yyextra->previous.get(),yyextra->current); - yyextra->previous.reset(); + yyextra->tempEntry = yyextra->current; // temporarily switch to the previous entry + yyextra->current = yyextra->previous; yyextra->docBlockContext = SkipCurlyEndDoc; yyextra->docBlockInBody = FALSE; -- cgit v0.12