summaryrefslogtreecommitdiffstats
path: root/src/code.l
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2010-11-18 21:50:39 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2010-11-18 21:50:39 (GMT)
commitdd7602fdd31d8f3e0f88be553da084a1e3fdec45 (patch)
treea6d2454b4e6d53003fa829bb7134fe373461ed97 /src/code.l
parentbe602ee76006d9b8b0f6e5e75114f2ce34f7773e (diff)
downloadDoxygen-dd7602fdd31d8f3e0f88be553da084a1e3fdec45.zip
Doxygen-dd7602fdd31d8f3e0f88be553da084a1e3fdec45.tar.gz
Doxygen-dd7602fdd31d8f3e0f88be553da084a1e3fdec45.tar.bz2
Release-1.7.2-20101118
Diffstat (limited to 'src/code.l')
-rw-r--r--src/code.l10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/code.l b/src/code.l
index e973bf9..82f807e 100644
--- a/src/code.l
+++ b/src/code.l
@@ -621,7 +621,7 @@ static void addParmType()
static void addUsingDirective(const char *name)
{
- if (g_exampleBlock && g_sourceFileDef && name)
+ if (g_sourceFileDef && name)
{
NamespaceDef *nd = Doxygen::namespaceSDict->find(name);
if (nd)
@@ -3394,10 +3394,12 @@ void parseCCode(CodeOutputInterface &od,const char *className,const QCString &s,
g_exampleName = exName;
g_sourceFileDef = fd;
g_lineNumbers = fd!=0 && showLineNumbers;
- if (exBlock && fd==0)
+ bool cleanupSourceDef = FALSE;
+ if (/* exBlock */ fd==0)
{
// create a dummy filedef for the example
- g_sourceFileDef = new FileDef("",exName);
+ g_sourceFileDef = new FileDef("",(exName?exName:"generated"));
+ cleanupSourceDef = TRUE;
}
if (g_sourceFileDef)
{
@@ -3433,7 +3435,7 @@ void parseCCode(CodeOutputInterface &od,const char *className,const QCString &s,
endFontClass();
g_code->endCodeLine();
}
- if (exBlock && fd==0)
+ if (cleanupSourceDef)
{
// delete the temporary file definition used for this example
delete g_sourceFileDef;