summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/docparser.cpp20
-rw-r--r--src/docparser.h13
2 files changed, 14 insertions, 19 deletions
diff --git a/src/docparser.cpp b/src/docparser.cpp
index ff253e5..8aae275 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -2050,25 +2050,9 @@ void DocIncOperator::parse()
{
if (g_includeFileName.isEmpty())
{
- QCString cmd;
- switch(type())
- {
- case Line:
- cmd = "\\line";
- break;
- case SkipLine:
- cmd = "\\skipLine";
- break;
- case Skip:
- cmd = "\\skip";
- break;
- case Until:
- cmd = "\\until";
- break;
- }
warn_doc_error(g_fileName,doctokenizerYYlineno,
- "No previous '\\include' or \\dontinclude' command for '%s' present",
- cmd.data());
+ "No previous '\\include' or \\dontinclude' command for '\\%s' present",
+ typeAsString());
}
m_includeFileName = g_includeFileName;
diff --git a/src/docparser.h b/src/docparser.h
index d36ed6c..0b8073c 100644
--- a/src/docparser.h
+++ b/src/docparser.h
@@ -607,11 +607,22 @@ class DocIncOperator : public DocNode
enum Type { Line, SkipLine, Skip, Until };
DocIncOperator(DocNode *parent,Type t,const QCString &pat,
const QCString &context,bool isExample,const QCString &exampleFile) :
- m_type(t), m_pattern(pat), m_context(context),
+ m_type(t), m_pattern(pat), m_context(context),
m_isFirst(FALSE), m_isLast(FALSE),
m_isExample(isExample), m_exampleFile(exampleFile) { m_parent = parent; }
Kind kind() const { return Kind_IncOperator; }
Type type() const { return m_type; }
+ const char *typeAsString() const
+ {
+ switch(m_type)
+ {
+ case Line: return "line";
+ case SkipLine: return "skipline";
+ case Skip: return "skip";
+ case Until: return "until";
+ }
+ return "";
+ }
QCString text() const { return m_text; }
QCString pattern() const { return m_pattern; }
QCString context() const { return m_context; }