mirror of
https://github.com/privacore/open-source-search-engine.git
synced 2025-07-14 02:36:06 -04:00
Call setHashTable before using s_tagDesc
This commit is contained in:
@ -1006,6 +1006,9 @@ std::set<int64_t> getDeprecatedTagTypes() {
|
||||
|
||||
std::set<int64_t> deprecatedTagTypes;
|
||||
|
||||
// initialize m_type
|
||||
g_tagdb.setHashTable();
|
||||
|
||||
for (int32_t i = 0; i < n; ++i) {
|
||||
if (s_tagDesc[i].m_flags & TDF_DEPRECATED) {
|
||||
deprecatedTagTypes.emplace(s_tagDesc[i].m_type);
|
||||
@ -1033,7 +1036,6 @@ void Tagdb::setHashTable ( ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// the hashtable of TagDescriptors
|
||||
if ( ! s_ht.set ( 4, sizeof(TagDesc *), 1024, NULL, 0, false, "tgdbtb" ) ) {
|
||||
log( LOG_WARN, "tagdb: Tagdb hash init failed." );
|
||||
|
Reference in New Issue
Block a user