summaryrefslogtreecommitdiffstats
path: root/src/message.h
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2021-04-11 19:22:59 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2021-04-22 17:34:13 (GMT)
commit592aaa4f17d73ec8c475df0f44efaea8cc4d575c (patch)
tree3cfd68cec756661045ee25c906a8d8f4bddf7a6a /src/message.h
parent98c67549bc3cd855873e0ef5eeab7c6410699d78 (diff)
downloadDoxygen-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/message.h')
-rw-r--r--src/message.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/message.h b/src/message.h
index aa63ecb..3c3ccd9 100644
--- a/src/message.h
+++ b/src/message.h
@@ -17,6 +17,7 @@
#define MESSAGE_H
#include <cstdarg>
+#include "qcstring.h"
#ifdef __GNUC__
#define PRINTFLIKE(FORMAT, PARAM ) __attribute__((format(printf, FORMAT, PARAM)))
@@ -25,15 +26,15 @@
#endif
extern void msg(const char *fmt, ...) PRINTFLIKE(1,2);
-extern void warn(const char *file,int line,const char *fmt, ...) PRINTFLIKE(3, 4);
-extern void va_warn(const char* file, int line, const char* fmt, va_list args);
-extern void warn_simple(const char *file,int line,const char *text);
-extern void warn_undoc(const char *file,int line,const char *fmt, ...) PRINTFLIKE(3, 4);
-extern void warn_incomplete_doc(const char *file,int line,const char *fmt, ...) PRINTFLIKE(3, 4);
-extern void warn_doc_error(const char *file,int line,const char *fmt, ...) PRINTFLIKE(3, 4);
+extern void warn(const QCString &file,int line,const char *fmt, ...) PRINTFLIKE(3, 4);
+extern void va_warn(const QCString &file, int line, const char* fmt, va_list args);
+extern void warn_simple(const QCString &file,int line,const char *text);
+extern void warn_undoc(const QCString &file,int line,const char *fmt, ...) PRINTFLIKE(3, 4);
+extern void warn_incomplete_doc(const QCString &file,int line,const char *fmt, ...) PRINTFLIKE(3, 4);
+extern void warn_doc_error(const QCString &file,int line,const char *fmt, ...) PRINTFLIKE(3, 4);
extern void warn_uncond(const char *fmt, ...) PRINTFLIKE(1, 2);
extern void err(const char *fmt, ...) PRINTFLIKE(1, 2);
-extern void err_full(const char *file,int line,const char *fmt, ...) PRINTFLIKE(3, 4);
+extern void err_full(const QCString &file,int line,const char *fmt, ...) PRINTFLIKE(3, 4);
extern void term(const char *fmt, ...) PRINTFLIKE(1, 2);
void initWarningFormat();
void warn_flush();