From eec3c9ab5eb881d596b489f1f6024e4ac29f23ce Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Fri, 1 Jan 2021 11:28:09 +0100 Subject: Refactoring: remove unused Doxygen::htmlDirMap --- src/doxygen.cpp | 1 - src/doxygen.h | 1 - src/util.cpp | 43 ++----------------------------------------- 3 files changed, 2 insertions(+), 43 deletions(-) diff --git a/src/doxygen.cpp b/src/doxygen.cpp index bd2f69e..4c66014 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -146,7 +146,6 @@ SearchIndexIntf *Doxygen::searchIndex=0; SymbolMap Doxygen::symbolMap; QDict *Doxygen::clangUsrMap = 0; bool Doxygen::outputToWizard=FALSE; -QDict * Doxygen::htmlDirMap = 0; Cache *Doxygen::lookupCache; DirLinkedMap *Doxygen::dirLinkedMap; SDict Doxygen::dirRelations(257); diff --git a/src/doxygen.h b/src/doxygen.h index a75618c..2ce27bd 100644 --- a/src/doxygen.h +++ b/src/doxygen.h @@ -126,7 +126,6 @@ class Doxygen static SymbolMap symbolMap; static QDict *clangUsrMap; static bool outputToWizard; - static QDict *htmlDirMap; static Cache *lookupCache; static DirLinkedMap *dirLinkedMap; static SDict dirRelations; diff --git a/src/util.cpp b/src/util.cpp index b520505..d64994b 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -83,17 +83,6 @@ //------------------------------------------------------------------------ -// selects one of the name to sub-dir mapping algorithms that is used -// to select a sub directory when CREATE_SUBDIRS is set to YES. - -#define ALGO_COUNT 1 -#define ALGO_CRC16 2 -#define ALGO_MD5 3 - -//#define MAP_ALGO ALGO_COUNT -//#define MAP_ALGO ALGO_CRC16 -#define MAP_ALGO ALGO_MD5 - #define REL_PATH_TO_ROOT "../../" static const char *hex = "0123456789ABCDEF"; @@ -3834,40 +3823,12 @@ QCString convertNameToFile(const char *name,bool allowDots,bool allowUnderscore) { int l1Dir=0,l2Dir=0; -#if MAP_ALGO==ALGO_COUNT - // old algorithm, has the problem that after regeneration the - // output can be located in a different dir. - if (Doxygen::htmlDirMap==0) - { - Doxygen::htmlDirMap=new QDict(100003); - Doxygen::htmlDirMap->setAutoDelete(TRUE); - } - static int curDirNum=0; - int *dirNum = Doxygen::htmlDirMap->find(result); - if (dirNum==0) // new name - { - Doxygen::htmlDirMap->insert(result,new int(curDirNum)); - l1Dir = (curDirNum)&0xf; // bits 0-3 - l2Dir = (curDirNum>>4)&0xff; // bits 4-11 - curDirNum++; - } - else // existing name - { - l1Dir = (*dirNum)&0xf; // bits 0-3 - l2Dir = ((*dirNum)>>4)&0xff; // bits 4-11 - } -#elif MAP_ALGO==ALGO_CRC16 - // second algorithm based on CRC-16 checksum - int dirNum = qChecksum(result,result.length()); - l1Dir = dirNum&0xf; - l2Dir = (dirNum>>4)&0xff; -#elif MAP_ALGO==ALGO_MD5 - // third algorithm based on MD5 hash + // compute md5 hash to determine sub directory to use uchar md5_sig[16]; MD5Buffer((const unsigned char *)result.data(),result.length(),md5_sig); l1Dir = md5_sig[14]&0xf; l2Dir = md5_sig[15]; -#endif + result.prepend(QCString().sprintf("d%x/d%02x/",l1Dir,l2Dir)); } //printf("*** convertNameToFile(%s)->%s\n",name,result.data()); -- cgit v0.12