Skip to content

Commit

Permalink
Refactoring: remove unused GenericsSDict class
Browse files Browse the repository at this point in the history
  • Loading branch information
doxygen committed Jan 2, 2021
1 parent 359ff95 commit 941bcb4
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 73 deletions.
48 changes: 0 additions & 48 deletions src/classlist.cpp
Expand Up @@ -113,52 +113,4 @@ void ClassLinkedRefMap::writeDocumentation(OutputList &ol,const Definition * con
}
}

//-------------------------------------------

void GenericsSDict::insert(const QCString &key,ClassDef *cd)
{
int i=key.find('<');
if (i==-1) return;
auto argList = stringToArgumentList(SrcLangExt_CSharp, key.mid(i));
int c = (int)argList->size();
if (c==0) return;
GenericsCollection *collection = m_dict.find(key.left(i));
if (collection==0) // new name
{
collection = new GenericsCollection;
m_dict.append(key.left(i),collection);
}
if (collection->find(c)==0) // should always be 0!
{
collection->insert(c,cd);
}
}

ClassDef *GenericsSDict::find(const QCString &key)
{
int i=key.find('<');
if (i==-1)
{
GenericsCollection *collection = m_dict.find(key);
if (collection && collection->count()==1)
{
QIntDictIterator<ClassDef> it(*collection);
return it.current();
}
}
else
{
GenericsCollection *collection = m_dict.find(key.left(i));
if (collection)
{
auto argList = stringToArgumentList(SrcLangExt_CSharp,key.mid(i));
int c = (int)argList->size();
return collection->find(c);
}
}
return 0;
}




24 changes: 0 additions & 24 deletions src/classlist.h
Expand Up @@ -18,33 +18,11 @@
#ifndef CLASSLIST_H
#define CLASSLIST_H

#include <qlist.h>
#include <qdict.h>

#include "linkedmap.h"
#include "classdef.h"
#include "sortdict.h"

class Definition;

class GenericsCollection : public QIntDict<ClassDef>
{
public:
GenericsCollection() : QIntDict<ClassDef>(17) {}
~GenericsCollection() {}
};

class GenericsSDict
{
public:
GenericsSDict() : m_dict(17) { m_dict.setAutoDelete(TRUE); }
~GenericsSDict() {}
void insert(const QCString &key,ClassDef *cd);
ClassDef *find(const QCString &key);
private:
SDict<GenericsCollection> m_dict;
};

class ClassLinkedMap : public LinkedMap<ClassDef>
{
};
Expand All @@ -57,6 +35,4 @@ class ClassLinkedRefMap : public LinkedRefMap<const ClassDef>
void writeDocumentation(OutputList &ol,const Definition * container=0) const;
};



#endif
1 change: 0 additions & 1 deletion src/doxygen.h
Expand Up @@ -49,7 +49,6 @@ class GroupLinkedMap;
class FileDef;
class ClassDef;
class ClassLinkedMap;
class GenericsSDict;
class MemberNameLinkedMap;
class FileNameLinkedMap;
class NamespaceLinkedMap;
Expand Down

0 comments on commit 941bcb4

Please sign in to comment.