@@ -367,7 +367,7 @@ void TagsManager::GetFiles(const wxString& partialName, std::vector<wxFileName>&
367367 }
368368}
369369
370- TagEntryPtr TagsManager::FunctionFromFileLine (const wxFileName& fileName, int lineno, bool nextFunction /* false */ )
370+ TagEntryPtr TagsManager::FunctionFromFileLine (const wxFileName& fileName, int lineno)
371371{
372372 if (!GetDatabase ()) {
373373 return NULL ;
@@ -377,22 +377,12 @@ TagEntryPtr TagsManager::FunctionFromFileLine(const wxFileName& fileName, int li
377377 CacheFile (fileName.GetFullPath ());
378378 }
379379
380- TagEntryPtr foo = NULL ;
381- for (size_t i = 0 ; i < m_cachedFileFunctionsTags.size (); i++) {
382- TagEntryPtr t = m_cachedFileFunctionsTags.at (i);
383-
384- if (nextFunction && t->GetLine () > lineno) {
385- // keep the last non matched method
386- foo = t;
387- } else if (t->GetLine () <= lineno) {
388- if (nextFunction) {
389- return foo;
390- } else {
391- return t;
392- }
380+ for (TagEntryPtr t : m_cachedFileFunctionsTags) {
381+ if (t->GetLine () <= lineno) {
382+ return t;
393383 }
394384 }
395- return foo ;
385+ return nullptr ;
396386}
397387
398388wxString TagsManager::FormatFunction (TagEntryPtr tag, size_t flags, const wxString& scope)
@@ -497,18 +487,15 @@ Language* TagsManager::GetLanguage()
497487 }
498488}
499489
500- void TagsManager::GetClasses (std::vector<TagEntryPtr>& tags, bool onlyWorkspace )
490+ void TagsManager::GetClasses (std::vector<TagEntryPtr>& tags)
501491{
502492 const wxArrayString kind = StdToWX::ToArrayString ({ wxT (" class" ), wxT (" struct" ), wxT (" union" ) });
503493
504494 GetDatabase ()->GetTagsByKind (kind, wxT (" name" ), ITagsStorage::OrderAsc, tags);
505495}
506496
507- void TagsManager::TagsByScope (const wxString& scopeName, const wxArrayString& kind, std::vector<TagEntryPtr>& tags,
508- bool include_anon)
497+ void TagsManager::TagsByScope (const wxString& scopeName, const wxArrayString& kind, std::vector<TagEntryPtr>& tags)
509498{
510- wxUnusedVar (include_anon);
511-
512499 wxArrayString scopes;
513500 GetScopesByScopeName (scopeName, scopes);
514501 // make enough room for max of 500 elements in the vector
@@ -549,7 +536,7 @@ wxString TagsManager::NormalizeFunctionSig(const wxString& sig, size_t flags,
549536 toStringFlags |= CxxVariable::kToString_DefaultValue ;
550537 }
551538
552- str_output << var->ToString (toStringFlags, {} );
539+ str_output << var->ToString (toStringFlags);
553540 // keep the length of this argument
554541 if (paramLen) {
555542 paramLen->push_back ({ start_offset, str_output.length () - start_offset });
0 commit comments