diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2021-04-11 19:22:59 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2021-04-22 17:34:13 (GMT) |
commit | 592aaa4f17d73ec8c475df0f44efaea8cc4d575c (patch) | |
tree | 3cfd68cec756661045ee25c906a8d8f4bddf7a6a /src/namespacedef.h | |
parent | 98c67549bc3cd855873e0ef5eeab7c6410699d78 (diff) | |
download | Doxygen-592aaa4f17d73ec8c475df0f44efaea8cc4d575c.zip Doxygen-592aaa4f17d73ec8c475df0f44efaea8cc4d575c.tar.gz Doxygen-592aaa4f17d73ec8c475df0f44efaea8cc4d575c.tar.bz2 |
Refactoring: remove implicit conversion from QCString to const char *
This commit changes the following in relation to string use
- The implicit convert from 'QCString' to 'const char *' is removed
- Strings parameters use 'const QCString &' as much as possible in favor
over 'const char *'
- 'if (s)' where s is a QCString has been replaced by 'if(!s.isEmpty())'
- data() now always returns a valid C-string and not a 0-pointer.
- when passing a string 's' to printf and related functions 'qPrint(s)' is
used instead of 's.data()'
- for empty string arguments 'QCString()' is used instead of '0'
- The copy() operation has been removed
- Where possible 'qstrcmp(a,b)==0' has been replaces by 'a==b' and
'qstrcmp(a,b)<0' has been replaced by 'a<b'
- Parameters of string type that were default initialized with '= 0' are
no initialized with '= QCString()'
Diffstat (limited to 'src/namespacedef.h')
-rw-r--r-- | src/namespacedef.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/namespacedef.h b/src/namespacedef.h index 711c9df..93fff75 100644 --- a/src/namespacedef.h +++ b/src/namespacedef.h @@ -45,7 +45,7 @@ class NamespaceLinkedMap : public LinkedMap<NamespaceDef> class NamespaceLinkedRefMap : public LinkedRefMap<const NamespaceDef> { public: - void writeDeclaration(OutputList &ol,const char *title, + void writeDeclaration(OutputList &ol,const QCString &title, bool isConstantGroup=false, bool localName=FALSE); bool declVisible() const; }; @@ -72,7 +72,7 @@ class NamespaceDef : public Definition virtual bool isLinkableInProject() const = 0; virtual bool isLinkable() const = 0; virtual bool hasDetailedDescription() const = 0; - virtual const Definition *findInnerCompound(const char *name) const = 0; + virtual const Definition *findInnerCompound(const QCString &name) const = 0; virtual bool subGrouping() const = 0; virtual MemberList *getMemberList(MemberListType lt) const = 0; virtual const MemberLists &getMemberLists() const = 0; @@ -134,9 +134,9 @@ class NamespaceDefMutable : public DefinitionMutable, public NamespaceDef }; /** Factory method to create new NamespaceDef instance */ -NamespaceDefMutable *createNamespaceDef(const char *defFileName,int defLine,int defColumn, - const char *name,const char *ref=0, - const char *refFile=0,const char*type=0, +NamespaceDefMutable *createNamespaceDef(const QCString &defFileName,int defLine,int defColumn, + const QCString &name,const QCString &ref=QCString(), + const QCString &refFile=QCString(),const QCString &type=QCString(), bool isPublished=false); /** Factory method to create an alias of an existing namespace. Used for inline namespaces. */ |