diff --git a/src/BroDoc.cc b/src/BroDoc.cc index 226e3e80a6..ea5277bea3 100644 --- a/src/BroDoc.cc +++ b/src/BroDoc.cc @@ -127,7 +127,18 @@ void BroDoc::WriteDocFile() const WriteBroDocObjList(notices, "Notices", '~'); WriteInterface("Public Interface", '-', '~', true, false); - WriteInterface("Private Interface", '-', '~', false, false); + + BroDocObjList::const_iterator it; + bool hasPrivateIdentifiers = false; + for ( it = all.begin(); it != all.end(); ++it ) + if ( ! IsPublicAPI(*it) ) + { + hasPrivateIdentifiers = true; + break; + } + + if ( hasPrivateIdentifiers ) + WriteInterface("Private Interface", '-', '~', false, false); if ( ! port_analysis.empty() ) { @@ -220,7 +231,7 @@ void BroDoc::WriteBroDocObjList(const BroDocObjList& l, { if ( l.empty() ) return; - std::list::const_iterator it; + BroDocObjList::const_iterator it; bool (*f_ptr)(const BroDocObj* o) = 0; if ( wantPublic )