File tree 3 files changed +4
-8
lines changed
3 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -152,7 +152,7 @@ std::unique_ptr<PageDef> Doxygen::mainPage;
152
152
std::unique_ptr<NamespaceDef> Doxygen::globalNamespaceDef;
153
153
NamespaceDefMutable *Doxygen::globalScope;
154
154
bool Doxygen::parseSourcesNeeded = FALSE;
155
- SearchIndexIntf * Doxygen::searchIndex=0 ;
155
+ std::unique_ptr< SearchIndexIntf> Doxygen::searchIndex;
156
156
SymbolMap<Definition>*Doxygen::symbolMap;
157
157
ClangUsrMap *Doxygen::clangUsrMap = 0;
158
158
Cache<std::string,LookupInfo> *Doxygen::typeLookupCache;
Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ class Doxygen
114
114
static NamespaceDefMutable *globalScope;
115
115
static QCString htmlFileExtension;
116
116
static bool parseSourcesNeeded;
117
- static SearchIndexIntf * searchIndex;
117
+ static std::unique_ptr< SearchIndexIntf> searchIndex;
118
118
static SymbolMap<Definition> *symbolMap;
119
119
static ClangUsrMap *clangUsrMap;
120
120
static Cache<std::string,LookupInfo> *typeLookupCache;
Original file line number Diff line number Diff line change @@ -525,15 +525,11 @@ void initSearchIndexer()
525
525
bool externalSearch = Config_getBool (EXTERNAL_SEARCH);
526
526
if (searchEngine && serverBasedSearch)
527
527
{
528
- Doxygen::searchIndex = new SearchIndexIntf (externalSearch ? SearchIndexIntf::External : SearchIndexIntf::Internal);
529
- }
530
- else // no search engine or pure javascript based search function
531
- {
532
- Doxygen::searchIndex = 0 ;
528
+ Doxygen::searchIndex = std::make_unique<SearchIndexIntf>(externalSearch ? SearchIndexIntf::External : SearchIndexIntf::Internal);
533
529
}
534
530
}
535
531
536
532
void finalizeSearchIndexer ()
537
533
{
538
- delete Doxygen::searchIndex;
534
+ Doxygen::searchIndex. reset () ;
539
535
}
You can’t perform that action at this time.
0 commit comments