summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2019-01-21 20:33:00 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2019-01-21 20:33:00 (GMT)
commit7de60f78e7ffdd01cc95be85d8c86bf2b56feaba (patch)
treed684b2a59c870230cbf842070b0722e275ae2530
parent248d2f8a60db14f2421b8993dde172bfb39e8981 (diff)
downloadDoxygen-7de60f78e7ffdd01cc95be85d8c86bf2b56feaba.zip
Doxygen-7de60f78e7ffdd01cc95be85d8c86bf2b56feaba.tar.gz
Doxygen-7de60f78e7ffdd01cc95be85d8c86bf2b56feaba.tar.bz2
Improve constness
-rw-r--r--src/classdef.cpp12
-rw-r--r--src/classdef.h12
2 files changed, 12 insertions, 12 deletions
diff --git a/src/classdef.cpp b/src/classdef.cpp
index a48df76..621b98c 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -2924,7 +2924,7 @@ void ClassDef::setTemplateArguments(ArgumentList *al)
/*! Returns \c TRUE iff this class or a class inheriting from this class
* is \e not defined in an external tag file.
*/
-bool ClassDef::hasNonReferenceSuperClass()
+bool ClassDef::hasNonReferenceSuperClass() const
{
bool found=!isReference() && isLinkableInProject() && !isHidden();
if (found)
@@ -3047,7 +3047,7 @@ bool ClassDef::isLinkable() const
/*! the class is visible in a class diagram, or class hierarchy */
-bool ClassDef::isVisibleInHierarchy()
+bool ClassDef::isVisibleInHierarchy() const
{
static bool allExternals = Config_getBool(ALLEXTERNALS);
static bool hideUndocClasses = Config_getBool(HIDE_UNDOC_CLASSES);
@@ -3081,7 +3081,7 @@ bool ClassDef::hasDocumentation() const
// returns TRUE iff class definition `bcd' represents an (in)direct base
// class of class definition `cd'.
-bool ClassDef::isBaseClass(ClassDef *bcd, bool followInstances,int level)
+bool ClassDef::isBaseClass(ClassDef *bcd, bool followInstances,int level) const
{
bool found=FALSE;
//printf("isBaseClass(cd=%s) looking for %s\n",name().data(),bcd->name().data());
@@ -3111,7 +3111,7 @@ bool ClassDef::isBaseClass(ClassDef *bcd, bool followInstances,int level)
//----------------------------------------------------------------------
-bool ClassDef::isSubClass(ClassDef *cd,int level)
+bool ClassDef::isSubClass(ClassDef *cd,int level) const
{
bool found=FALSE;
if (level>256)
@@ -4274,7 +4274,7 @@ MemberDef *ClassDef::getMemberByName(const QCString &name) const
return xmd;
}
-bool ClassDef::isAccessibleMember(MemberDef *md)
+bool ClassDef::isAccessibleMember(MemberDef *md) const
{
return md->getClassDef() && isBaseClass(md->getClassDef(),TRUE);
}
@@ -4297,7 +4297,7 @@ MemberList *ClassDef::createMemberList(MemberListType lt)
return ml;
}
-MemberList *ClassDef::getMemberList(MemberListType lt)
+MemberList *ClassDef::getMemberList(MemberListType lt) const
{
QListIterator<MemberList> mli(m_impl->memberLists);
MemberList *ml;
diff --git a/src/classdef.h b/src/classdef.h
index 14f9fc8..1360612 100644
--- a/src/classdef.h
+++ b/src/classdef.h
@@ -174,7 +174,7 @@ class ClassDef : public Definition
bool isLinkable() const;
/** the class is visible in a class diagram, or class hierarchy */
- bool isVisibleInHierarchy();
+ bool isVisibleInHierarchy() const;
/** show this class in the declaration section of its parent? */
bool visibleInParentsDeclList() const;
@@ -203,17 +203,17 @@ class ClassDef : public Definition
* class. This function will recursively traverse all branches of the
* inheritance tree.
*/
- bool isBaseClass(ClassDef *bcd,bool followInstances,int level=0);
+ bool isBaseClass(ClassDef *bcd,bool followInstances,int level=0) const;
/** Returns TRUE iff \a bcd is a direct or indirect sub class of this
* class.
*/
- bool isSubClass(ClassDef *bcd,int level=0);
+ bool isSubClass(ClassDef *bcd,int level=0) const;
/** returns TRUE iff \a md is a member of this class or of the
* the public/protected members of a base class
*/
- bool isAccessibleMember(MemberDef *md);
+ bool isAccessibleMember(MemberDef *md) const;
/** Returns a sorted dictionary with all template instances found for
* this template class. Returns 0 if not a template or no instances.
@@ -296,7 +296,7 @@ class ClassDef : public Definition
QCString className() const;
/** Returns the members in the list identified by \a lt */
- MemberList *getMemberList(MemberListType lt);
+ MemberList *getMemberList(MemberListType lt) const;
/** Returns the list containing the list of members sorted per type */
const QList<MemberList> &getMemberLists() const;
@@ -414,7 +414,7 @@ class ClassDef : public Definition
protected:
void addUsedInterfaceClasses(MemberDef *md,const char *typeStr);
- bool hasNonReferenceSuperClass();
+ bool hasNonReferenceSuperClass() const;
void showUsedFiles(OutputList &ol);
private: