size_type data type changed to best matching class

This commit is contained in:
Simon Rozman 2016-03-08 14:44:48 +01:00
parent 0e70075c78
commit b9199f9a7b
2 changed files with 5 additions and 5 deletions

View File

@ -35,7 +35,7 @@ inline std::ostream& operator <<(std::ostream& stream, const ZRCola::translation
unsigned __int32 count;
// Write index count.
std::vector<unsigned __int32>::size_type trans_count = db.idxComp.size();
ZRCola::translation_db::indexComp::size_type trans_count = db.idxComp.size();
#if defined(_WIN64) || defined(__x86_64__) || defined(__ppc64__)
// 4G check
if (trans_count > 0xffffffff) {
@ -91,7 +91,7 @@ inline std::ostream& operator <<(std::ostream& stream, const ZRCola::keyseq_db &
unsigned __int32 count;
// Write index count.
std::vector<unsigned __int32>::size_type ks_count = db.idxChr.size();
ZRCola::keyseq_db::indexChr::size_type ks_count = db.idxChr.size();
#if defined(_WIN64) || defined(__x86_64__) || defined(__ppc64__)
// 4G check
if (ks_count > 0xffffffff) {
@ -303,7 +303,7 @@ int _tmain(int argc, _TCHAR *argv[])
db.idxKey.sort();
// Check key sequences.
for (std::vector<unsigned __int32>::size_type i = 1, n = db.idxKey.size(); i < n; i++) {
for (ZRCola::keyseq_db::indexKey::size_type i = 1, n = db.idxKey.size(); i < n; i++) {
const ZRCola::keyseq_db::keyseq
&ks1 = db.idxKey[i - 1],
&ks2 = db.idxKey[i ];

View File

@ -34,7 +34,7 @@ void ZRCola::translation_db::Compose(_In_z_count_(inputMax) const wchar_t* input
if (map)
map->clear();
std::vector<unsigned __int32>::size_type compositionsCount = idxComp.size();
indexComp::size_type compositionsCount = idxComp.size();
for (size_t i = 0; i < inputMax;) {
// Start with the full search area at i-th character.
@ -134,7 +134,7 @@ void ZRCOLA_API ZRCola::translation_db::Decompose(_In_z_count_(inputMax) const w
if (map)
map->clear();
std::vector<unsigned __int32>::size_type decompositionsCount = idxDecomp.size();
indexDecomp::size_type decompositionsCount = idxDecomp.size();
for (size_t i = 0; i < inputMax;) {
// Find whether the character can be decomposed.