mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 04:24:09 +00:00
Merge branch 'staged' into dev
This commit is contained in:
commit
c861fcd958
|
@ -555,7 +555,7 @@ MdictParser::BlockInfoVector MdictParser::decodeHeadWordBlockInfo( QByteArray co
|
||||||
qint64 compressedSize = readNumber( s );
|
qint64 compressedSize = readNumber( s );
|
||||||
// headword block decompressed size
|
// headword block decompressed size
|
||||||
qint64 decompressedSize = readNumber( s );
|
qint64 decompressedSize = readNumber( s );
|
||||||
headWordBlockInfos.push_back( BlockInfoVector::value_type( compressedSize, decompressedSize ) );
|
headWordBlockInfos.emplace_back(compressedSize, decompressedSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
return headWordBlockInfos;
|
return headWordBlockInfos;
|
||||||
|
@ -588,7 +588,7 @@ MdictParser::HeadWordIndex MdictParser::splitHeadWordBlock( QByteArray const & b
|
||||||
}
|
}
|
||||||
p += headWordBuf.size();
|
p += headWordBuf.size();
|
||||||
QString headWord = toUtf16( encoding_, headWordBuf.constBegin(), headWordBuf.size() );
|
QString headWord = toUtf16( encoding_, headWordBuf.constBegin(), headWordBuf.size() );
|
||||||
index.push_back( HeadWordIndex::value_type( headWordId, headWord ) );
|
index.emplace_back(headWordId, headWord);
|
||||||
}
|
}
|
||||||
|
|
||||||
return index;
|
return index;
|
||||||
|
|
4
mdx.cc
4
mdx.cc
|
@ -435,8 +435,8 @@ void MdxDictionary::doDeferredInit()
|
||||||
idx.read( &buf.front(), sz );
|
idx.read( &buf.front(), sz );
|
||||||
uint32_t btreeMaxElements = idx.read<uint32_t>();
|
uint32_t btreeMaxElements = idx.read<uint32_t>();
|
||||||
uint32_t rootOffset = idx.read<uint32_t>();
|
uint32_t rootOffset = idx.read<uint32_t>();
|
||||||
mddFileNames.push_back( string( &buf.front() ) );
|
mddFileNames.emplace_back(&buf.front());
|
||||||
mddIndexInfos.push_back( IndexInfo( btreeMaxElements, rootOffset ) );
|
mddIndexInfos.emplace_back(btreeMaxElements, rootOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
vector< string > const dictFiles = getDictionaryFilenames();
|
vector< string > const dictFiles = getDictionaryFilenames();
|
||||||
|
|
Loading…
Reference in a new issue