summaryrefslogtreecommitdiffstats
path: root/src/definition.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2013-12-05 22:54:38 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2013-12-12 19:13:02 (GMT)
commit6dbf32d505d5c9e628474fb83e379b2646d24d3f (patch)
treee0b98894b91f0151f10136f50d42feb5d6a7dc1b /src/definition.cpp
parent4d5ddf7777b833969eeac30ee313484eb259f751 (diff)
downloadDoxygen-6dbf32d505d5c9e628474fb83e379b2646d24d3f.zip
Doxygen-6dbf32d505d5c9e628474fb83e379b2646d24d3f.tar.gz
Doxygen-6dbf32d505d5c9e628474fb83e379b2646d24d3f.tar.bz2
More template and context enhancements
Diffstat (limited to 'src/definition.cpp')
-rw-r--r--src/definition.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/definition.cpp b/src/definition.cpp
index 2c05f29..46147fc 100644
--- a/src/definition.cpp
+++ b/src/definition.cpp
@@ -1050,6 +1050,13 @@ void Definition::setBodyDef(FileDef *fd)
m_impl->body->fileDef=fd;
}
+bool Definition::hasSources() const
+{
+ return m_impl->body && m_impl->body->startLine!=-1 &&
+ m_impl->body->endLine>=m_impl->body->startLine &&
+ m_impl->body->fileDef;
+}
+
/*! Write code of this definition into the documentation */
void Definition::writeInlineCode(OutputList &ol,const char *scopeName)
{
@@ -1057,9 +1064,7 @@ void Definition::writeInlineCode(OutputList &ol,const char *scopeName)
ol.pushGeneratorState();
//printf("Source Fragment %s: %d-%d bodyDef=%p\n",name().data(),
// m_startBodyLine,m_endBodyLine,m_bodyDef);
- if (inlineSources &&
- m_impl->body && m_impl->body->startLine!=-1 &&
- m_impl->body->endLine>=m_impl->body->startLine && m_impl->body->fileDef)
+ if (inlineSources && hasSources())
{
QCString codeFragment;
int actualStart=m_impl->body->startLine,actualEnd=m_impl->body->endLine;