Make character category data reusable
This shall assist adding/replacing it with Unicode character blocks. Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
@@ -813,9 +813,9 @@ int _tmain(int argc, _TCHAR *argv[])
|
||||
ZRCola::chrcat_db db;
|
||||
|
||||
// Preallocate memory.
|
||||
db.idxChrCat.reserve(count);
|
||||
db.idxRank .reserve(count);
|
||||
db.data .reserve(count*4);
|
||||
db.idxChrId.reserve(count);
|
||||
db.idxRank .reserve(count);
|
||||
db.data .reserve(count*4);
|
||||
|
||||
// Parse character categories and build index and data.
|
||||
for (; !ZRCola::DBSource::IsEOF(rs); rs->MoveNext()) {
|
||||
@@ -836,8 +836,8 @@ int _tmain(int argc, _TCHAR *argv[])
|
||||
}
|
||||
|
||||
// Write character categories to file.
|
||||
db.idxChrCat.sort();
|
||||
db.idxRank .sort();
|
||||
db.idxChrId.sort();
|
||||
db.idxRank .sort();
|
||||
dst << ZRCola::chrcat_rec(db);
|
||||
} else {
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0019: Error getting character category count from database or too many character categories.\n"), (LPCTSTR)filenameIn.c_str());
|
||||
|
||||
Reference in New Issue
Block a user