Got rid of translated comments cache, seems very inefficient
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-doxygen@13255 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
4398d1aee4
commit
f57b515ee7
2 changed files with 3 additions and 22 deletions
|
|
@ -15,12 +15,8 @@
|
|||
#include "DoxygenTranslator.h"
|
||||
|
||||
DoxygenTranslator::DoxygenTranslator() {
|
||||
// Init the cache
|
||||
resultsCache = NewHash();
|
||||
}
|
||||
DoxygenTranslator::~DoxygenTranslator() {
|
||||
// Clean up the cache
|
||||
Delete(resultsCache);
|
||||
}
|
||||
|
||||
bool DoxygenTranslator::hasDocumentation(Node *node) {
|
||||
|
|
@ -37,17 +33,7 @@ String *DoxygenTranslator::getDocumentation(Node *node) {
|
|||
if (!hasDocumentation(node))
|
||||
return 0;
|
||||
|
||||
// get from cache
|
||||
String *resultedDocs = Getattr(resultsCache, getDoxygenComment(node));
|
||||
|
||||
if (resultedDocs)
|
||||
return resultedDocs;
|
||||
|
||||
// not found in cache, produce it
|
||||
resultedDocs = makeDocumentation(node);
|
||||
Setattr(resultsCache, getDoxygenComment(node), resultedDocs);
|
||||
|
||||
return resultedDocs;
|
||||
return makeDocumentation(node);
|
||||
}
|
||||
|
||||
void DoxygenTranslator::printTree(std::list < DoxygenEntity > &entityList) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue