Skip to content

Commit 332323e

Browse files
committed
Added const to a couple for references
1 parent 8c6cd77 commit 332323e

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/classdef.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1722,8 +1722,8 @@ void ClassDefImpl::writeInheritanceGraph(OutputList &ol) const
17221722
{
17231723
auto replaceFunc = [this,&ol](size_t entryIndex)
17241724
{
1725-
BaseClassDef &bcd=m_impl->inherits[entryIndex];
1726-
ClassDef *cd=bcd.classDef;
1725+
const BaseClassDef &bcd=m_impl->inherits[entryIndex];
1726+
const ClassDef *cd=bcd.classDef;
17271727

17281728
// use the class name but with the template arguments as given
17291729
// in the inheritance relation
@@ -1757,8 +1757,8 @@ void ClassDefImpl::writeInheritanceGraph(OutputList &ol) const
17571757

17581758
auto replaceFunc = [this,&ol](size_t entryIndex)
17591759
{
1760-
BaseClassDef &bcd=m_impl->inheritedBy[entryIndex];
1761-
ClassDef *cd=bcd.classDef;
1760+
const BaseClassDef &bcd=m_impl->inheritedBy[entryIndex];
1761+
const ClassDef *cd=bcd.classDef;
17621762
if (cd->isLinkable())
17631763
{
17641764
ol.writeObjectLink(cd->getReference(),cd->getOutputFileBase(),cd->anchor(),cd->displayName());
@@ -3782,8 +3782,8 @@ void ClassDefImpl::mergeCategory(ClassDef *cat)
37823782
if (dstMni) // method is already defined in the class
37833783
{
37843784
//printf("Existing member %s\n",srcMni->memberName());
3785-
auto &dstMi = dstMni->front();
3786-
auto &srcMi = srcMni->front();
3785+
const auto &dstMi = dstMni->front();
3786+
const auto &srcMi = srcMni->front();
37873787
if (srcMi && dstMi)
37883788
{
37893789
MemberDefMutable *smdm = toMemberDefMutable(srcMi->memberDef());

src/util.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4274,7 +4274,7 @@ void addMembersToMemberGroup(MemberList *ml,
42744274
auto it = Doxygen::memberGroupInfoMap.find(groupId);
42754275
if (it!=Doxygen::memberGroupInfoMap.end())
42764276
{
4277-
auto &info = it->second;
4277+
const auto &info = it->second;
42784278
auto mg_it = std::find_if(pMemberGroups->begin(),
42794279
pMemberGroups->end(),
42804280
[&groupId](const auto &g)
@@ -4314,7 +4314,7 @@ void addMembersToMemberGroup(MemberList *ml,
43144314
auto it = Doxygen::memberGroupInfoMap.find(groupId);
43154315
if (it!=Doxygen::memberGroupInfoMap.end())
43164316
{
4317-
auto &info = it->second;
4317+
const auto &info = it->second;
43184318
auto mg_it = std::find_if(pMemberGroups->begin(),
43194319
pMemberGroups->end(),
43204320
[&groupId](const auto &g)

0 commit comments

Comments
 (0)