summaryrefslogtreecommitdiffstats
path: root/src/definition.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/definition.cpp')
-rw-r--r--src/definition.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/definition.cpp b/src/definition.cpp
index d3da6b5..22a1435 100644
--- a/src/definition.cpp
+++ b/src/definition.cpp
@@ -736,7 +736,7 @@ class FilterCache
if (numBytes!=item->fileSize)
{
err("Failed to read %d bytes from position %d in filter database file %s: got %d bytes\n",
- (int)item->fileSize,(int)item->filePos,qPrint(Doxygen::filterDBFileName),numBytes);
+ (int)item->fileSize,(int)item->filePos,qPrint(Doxygen::filterDBFileName),(int)numBytes);
success=FALSE;
}
}
@@ -998,11 +998,11 @@ QCString DefinitionImpl::getSourceAnchor() const
{
if (Htags::useHtags)
{
- qsnprintf(anchorStr,maxAnchorStrLen,"L%d",m_impl->body->startLine);
+ qsnprintf(anchorStr,maxAnchorStrLen,"L%d",m_impl->body->defLine);
}
else
{
- qsnprintf(anchorStr,maxAnchorStrLen,"l%05d",m_impl->body->startLine);
+ qsnprintf(anchorStr,maxAnchorStrLen,"l%05d",m_impl->body->defLine);
}
}
return anchorStr;
@@ -1025,7 +1025,7 @@ void DefinitionImpl::writeSourceDef(OutputList &ol,const char *) const
if (lineMarkerPos!=-1 && fileMarkerPos!=-1) // should always pass this.
{
QCString lineStr;
- lineStr.sprintf("%d",m_impl->body->startLine);
+ lineStr.sprintf("%d",m_impl->body->defLine);
QCString anchorStr = getSourceAnchor();
ol.startParagraph("definition");
if (lineMarkerPos<fileMarkerPos) // line marker before file marker
@@ -1197,12 +1197,13 @@ void DefinitionImpl::writeSourceDef(OutputList &ol,const char *) const
ol.popGeneratorState();
}
-void DefinitionImpl::setBodySegment(int bls,int ble)
+void DefinitionImpl::setBodySegment(int defLine, int bls,int ble)
{
//printf("setBodySegment(%d,%d) for %s\n",bls,ble,name().data());
if (m_impl->body==0) m_impl->body = new BodyInfo;
- m_impl->body->startLine=bls;
- m_impl->body->endLine=ble;
+ m_impl->body->defLine = defLine;
+ m_impl->body->startLine = bls;
+ m_impl->body->endLine = ble;
}
void DefinitionImpl::setBodyDef(FileDef *fd)
@@ -2056,6 +2057,11 @@ bool DefinitionImpl::isReference() const
return !m_impl->ref.isEmpty();
}
+int DefinitionImpl::getStartDefLine() const
+{
+ return m_impl->body ? m_impl->body->defLine : -1;
+}
+
int DefinitionImpl::getStartBodyLine() const
{
return m_impl->body ? m_impl->body->startLine : -1;