Skip to content

Commit

Permalink
Fixed section type setting for index page from tags file. (#7684)
Browse files Browse the repository at this point in the history
Resolves warning introduced by #7679

Signed-off-by: Andrey Vostrikov <andrey.vostrikov@cogentembedded.com>
  • Loading branch information
avostrik committed Apr 3, 2020
1 parent e40d658 commit 4b5a3c1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/tagreader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1486,7 +1486,8 @@ void TagFileParser::buildLists(const std::shared_ptr<Entry> &root)
for (pgit.toFirst();(tpi=pgit.current());++pgit)
{
std::shared_ptr<Entry> pe = std::make_shared<Entry>();
pe->section = tpi->filename=="index" ? Entry::MAINPAGEDOC_SEC : Entry::PAGEDOC_SEC;
bool isIndex = (stripExtensionGeneral(tpi->filename,getFileNameExtension(tpi->filename))=="index");
pe->section = isIndex ? Entry::MAINPAGEDOC_SEC : Entry::PAGEDOC_SEC;
pe->name = tpi->name;
pe->args = tpi->title;
addDocAnchors(pe,tpi->docAnchors);
Expand Down

0 comments on commit 4b5a3c1

Please sign in to comment.