diff --git a/ZRCola/zrcolachrgrid.cpp b/ZRCola/zrcolachrgrid.cpp index 116c043..1854d46 100644 --- a/ZRCola/zrcolachrgrid.cpp +++ b/ZRCola/zrcolachrgrid.cpp @@ -100,13 +100,10 @@ wxString wxZRColaCharGrid::GetToolTipText(int idx) ZRColaApp *app = (ZRColaApp*)wxTheApp; // See if this character has a key sequence registered. - ZRCola::keyseq_db::indexKey::size_type start; - bool found; char ks[sizeof(ZRCola::keyseq_db::keyseq)] = {}; ((ZRCola::keyseq_db::keyseq*)ks)->chr = m_chars[idx]; - found = app->m_ks_db.idxChr.find(*(ZRCola::keyseq_db::keyseq*)ks, start); - - if (found) { + ZRCola::keyseq_db::indexKey::size_type start; + if (app->m_ks_db.idxChr.find(*(ZRCola::keyseq_db::keyseq*)ks, start)) { ZRCola::keyseq_db::keyseq &seq = app->m_ks_db.idxChr[start]; wxString ks_str; if (ZRCola::keyseq_db::GetSequenceAsText(seq.seq, seq.seq_len, ks_str)) diff --git a/ZRCola/zrcolachrslct.cpp b/ZRCola/zrcolachrslct.cpp index 53800be..94c9c75 100644 --- a/ZRCola/zrcolachrslct.cpp +++ b/ZRCola/zrcolachrslct.cpp @@ -43,7 +43,7 @@ wxZRColaCharSelect::wxZRColaCharSelect(wxWindow* parent) : // Fill categories. ZRColaApp *app = (ZRColaApp*)wxTheApp; for (size_t i = 0, n = app->m_cc_db.idxRnk.size(); i < n; i++) { - const ZRCola::chrcat_db::chrcat &cc = app->m_cc_db.idxRnk[i]; + const auto &cc = app->m_cc_db.idxRnk[i]; int idx = m_categories->Insert(wxGetTranslation(wxString(cc.name, cc.name_len), wxT("ZRCola-zrcdb")), i); m_categories->Check(idx); m_ccOrder.insert(std::make_pair(cc.id, idx)); @@ -82,14 +82,14 @@ void wxZRColaCharSelect::OnIdle(wxIdleEvent& event) ((ZRCola::character_db::character*)chr)->chr = m_char; size_t start; if (app->m_chr_db.idxChr.find(*(ZRCola::character_db::character*)chr, start)) { - const ZRCola::character_db::character &chr = app->m_chr_db.idxChr[start]; + const auto &chr = app->m_chr_db.idxChr[start]; // Update characted description. m_description->SetValue(wxString(chr.data, chr.desc_len)); { // See if this character has a key sequence registered. - ZRCola::keyseq_db::indexKey::size_type start; char ks[sizeof(ZRCola::keyseq_db::keyseq)] = {}; ((ZRCola::keyseq_db::keyseq*)ks)->chr = m_char; + ZRCola::keyseq_db::indexKey::size_type start; if (app->m_ks_db.idxChr.find(*(ZRCola::keyseq_db::keyseq*)ks, start)) { ZRCola::keyseq_db::keyseq &seq = app->m_ks_db.idxChr[start]; wxString ks_str; @@ -106,7 +106,7 @@ void wxZRColaCharSelect::OnIdle(wxIdleEvent& event) size_t start; // Update character category. if (app->m_cc_db.idxChrCat.find(*((ZRCola::chrcat_db::chrcat*)cc), start)) { - const ZRCola::chrcat_db::chrcat &cat = app->m_cc_db.idxChrCat[start]; + const auto &cat = app->m_cc_db.idxChrCat[start]; m_category->SetValue(wxGetTranslation(wxString(cat.name, cat.name_len), wxT("ZRCola-zrcdb"))); } else m_category->SetValue(wxEmptyString); @@ -145,7 +145,7 @@ void wxZRColaCharSelect::OnIdle(wxIdleEvent& event) // Select categories. for (size_t i = 0, n = app->m_cc_db.idxRnk.size(); i < n; i++) { - const ZRCola::chrcat_db::chrcat &cc = app->m_cc_db.idxRnk[i]; + const auto &cc = app->m_cc_db.idxRnk[i]; if (m_categories->IsChecked(i)) m_searchThread->m_cats.insert(cc.id); } @@ -239,7 +239,7 @@ void wxZRColaCharSelect::OnSearchComplete(wxThreadEvent& event) // Display results. wxString chars; chars.reserve(m_searchThread->m_hits.size()); - for (std::vector >::const_iterator i = m_searchThread->m_hits.cbegin(), i_end = m_searchThread->m_hits.cend(); i != i_end; ++i) + for (auto i = m_searchThread->m_hits.cbegin(), i_end = m_searchThread->m_hits.cend(); i != i_end; ++i) chars += i->second; m_gridResults->SetCharacters(chars); @@ -413,8 +413,8 @@ void wxZRColaCharSelect::ResetResults() wxString val; val.reserve(n); for (i = 0; i < n; i++) { - const ZRCola::character_db::character &chr = app->m_chr_db.idxChr[i]; - std::map::const_iterator idx = m_ccOrder.find(chr.cat); + const auto &chr = app->m_chr_db.idxChr[i]; + auto idx = m_ccOrder.find(chr.cat); if (idx == m_ccOrder.end() || m_categories->IsChecked(idx->second)) val += chr.chr; } @@ -450,7 +450,7 @@ void wxZRColaCharSelect::NavigateBy(int offset) } m_navigateBack->Enable(m_historyCursor != m_history.begin()); - std::list::iterator cursor_next(m_historyCursor); + auto cursor_next = m_historyCursor; ++cursor_next; m_navigateForward->Enable(cursor_next != m_history.end()); @@ -477,7 +477,7 @@ void wxZRColaCharSelect::NavigateTo(wchar_t c) m_historyCursor = m_history.insert(m_historyCursor, state); // Purge the history's tail. - std::list::iterator cursor_next(m_historyCursor); + auto cursor_next = m_historyCursor; ++cursor_next; m_history.erase(cursor_next, m_history.end()); @@ -509,9 +509,9 @@ wxThread::ExitCode wxZRColaCharSelect::SearchThread::Entry() // Search by indexes and merge results. std::map hits_sub; if (!app->m_chr_db.Search(m_search.c_str(), m_cats, hits, hits_sub, TestDestroyS, this)) return (wxThread::ExitCode)1; - for (std::map::const_iterator i = hits_sub.cbegin(), i_end = hits_sub.cend(); i != i_end; ++i) { + for (auto i = hits_sub.cbegin(), i_end = hits_sub.cend(); i != i_end; ++i) { if (TestDestroy()) return (wxThread::ExitCode)1; - std::map::iterator idx = hits.find(i->first); + auto idx = hits.find(i->first); if (idx == hits.end()) hits.insert(std::make_pair(i->first, i->second / 4)); else @@ -521,7 +521,7 @@ wxThread::ExitCode wxZRColaCharSelect::SearchThread::Entry() // Get best rank. ZRCola::charrank_t rank_ref = 0; - for (std::map::const_iterator i = hits.cbegin(), i_end = hits.cend(); i != i_end; ++i) { + for (auto i = hits.cbegin(), i_end = hits.cend(); i != i_end; ++i) { if (TestDestroy()) return (wxThread::ExitCode)1; if (i->second > rank_ref) rank_ref = i->second; @@ -530,7 +530,7 @@ wxThread::ExitCode wxZRColaCharSelect::SearchThread::Entry() // Now sort the characters by rank (taking only top 3/4 by rank). ZRCola::charrank_t rank_threshold = rank_ref*3/4; m_hits.reserve(hits.size()); - for (std::map::const_iterator i = hits.cbegin(), i_end = hits.cend(); i != i_end; ++i) { + for (auto i = hits.cbegin(), i_end = hits.cend(); i != i_end; ++i) { if (TestDestroy()) return (wxThread::ExitCode)1; if (i->second > rank_threshold) m_hits.push_back(std::make_pair(i->second, i->first)); @@ -586,7 +586,7 @@ void wxPersistentZRColaCharSelect::Save() const ZRColaApp *app = (ZRColaApp*)wxTheApp; for (size_t i = 0, n = app->m_cc_db.idxRnk.size(); i < n; i++) { - const ZRCola::chrcat_db::chrcat &cc = app->m_cc_db.idxRnk[i]; + const auto &cc = app->m_cc_db.idxRnk[i]; wxString name(wxT("category")); name.Append(cc.id.data, _countof(cc.id.data)); SaveValue(name, wnd->m_categories->IsChecked(i)); @@ -606,7 +606,7 @@ bool wxPersistentZRColaCharSelect::Restore() ZRColaApp *app = (ZRColaApp*)wxTheApp; for (size_t i = 0, n = app->m_cc_db.idxRnk.size(); i < n; i++) { - const ZRCola::chrcat_db::chrcat &cc = app->m_cc_db.idxRnk[i]; + const auto &cc = app->m_cc_db.idxRnk[i]; wxString name(wxT("category")); name.Append(cc.id.data, _countof(cc.id.data)); bool val; diff --git a/ZRCola/zrcolafrm.cpp b/ZRCola/zrcolafrm.cpp index a72f551..b8a31e3 100644 --- a/ZRCola/zrcolafrm.cpp +++ b/ZRCola/zrcolafrm.cpp @@ -459,7 +459,7 @@ void wxZRColaFrame::DoSend(const wxString& str) { // Prepare the INPUT table. wxString::size_type n = str.length(); - wxString::const_iterator i_str = str.begin(); + auto i_str = str.begin(); std::vector input; input.reserve(n*2); for (std::vector::size_type i = 0; i < n; i++, i_str++) { diff --git a/ZRCola/zrcolakeyhndlr.cpp b/ZRCola/zrcolakeyhndlr.cpp index 184a369..68816d5 100644 --- a/ZRCola/zrcolakeyhndlr.cpp +++ b/ZRCola/zrcolakeyhndlr.cpp @@ -96,7 +96,7 @@ bool wxZRColaKeyHandler::ProcessEvent(wxEvent& event) (e.AltDown() ? ZRCola::keyseq_db::keyseq::ALT : 0); m_seq.push_back(key); - std::vector::size_type n = m_seq.size(); + auto n = m_seq.size(); ZRCola::keyseq_db::keyseq *ks = (ZRCola::keyseq_db::keyseq*)new char[sizeof(ZRCola::keyseq_db::keyseq) + sizeof(ZRCola::keyseq_db::keyseq::key_t)*n]; ks->chr = 0; ks->seq_len = n; @@ -147,7 +147,7 @@ bool wxZRColaKeyHandler::ProcessEvent(wxEvent& event) if (pFrame && pFrame->GetStatusBar()) pFrame->SetStatusText(wxEmptyString); - std::vector::size_type count = m_insert_seq.size(); + auto count = m_insert_seq.size(); if (count) { // Zero terminate sequence and parse the Unicode value. m_insert_seq.push_back(0); diff --git a/ZRCola/zrcolasettings.cpp b/ZRCola/zrcolasettings.cpp index a657f8e..3f3bdba 100644 --- a/ZRCola/zrcolasettings.cpp +++ b/ZRCola/zrcolasettings.cpp @@ -32,7 +32,7 @@ wxZRColaSettings::wxZRColaSettings(wxWindow* parent) : ZRColaApp *app = ((ZRColaApp*)wxTheApp); m_languages->Clear(); for (size_t i = 0, n = app->m_lang_db.idxLng.size(); i < n; i++) { - const ZRCola::language_db::language &lang = app->m_lang_db.idxLng[i]; + const auto &lang = app->m_lang_db.idxLng[i]; wxString label(lang.name, lang.name_len), label_tran(wxGetTranslation(label, wxT("ZRCola-zrcdb"))); @@ -122,7 +122,7 @@ void wxZRColaSettings::OnApplyButtonClick(wxCommandEvent& event) m_lang_auto = false; ZRColaApp *app = ((ZRColaApp*)wxTheApp); - const ZRCola::language_db::language &lang = app->m_lang_db.idxLng[m_languages->GetSelection()]; + const auto &lang = app->m_lang_db.idxLng[m_languages->GetSelection()]; if (m_lang != lang.id) { m_lang = lang.id; @@ -181,7 +181,7 @@ bool wxPersistentZRColaSettings::Restore() // The language was read from configuration. wnd->m_lang = lang.c_str(); } else if (!app->m_lang_db.idxLng.empty()) { - const ZRCola::language_db::language &lang = app->m_lang_db.idxLng[0]; + const auto &lang = app->m_lang_db.idxLng[0]; wnd->m_lang = lang.id; } else wnd->m_lang = ZRCola::langid_t_blank; diff --git a/ZRColaCompile/dbsource.cpp b/ZRColaCompile/dbsource.cpp index 3c47436..01b947b 100644 --- a/ZRColaCompile/dbsource.cpp +++ b/ZRColaCompile/dbsource.cpp @@ -96,13 +96,13 @@ unsigned int ZRCola::DBSource::character_bank::build_related_worker::process() set, heap_allocator > matching(less(), al); for (size_type i = m_from; i < m_to; i++) { - ZRCola::DBSource::character &chr = *(m_cb->at(i).get()); + auto &chr = *(m_cb->at(i).get()); if (&chr == NULL) continue; rel.clear(); // Remove all unexisting, inactive, or self related characters. - for (wstring::size_type j = chr.rel.length(); j--;) { + for (auto j = chr.rel.length(); j--;) { wchar_t c = chr.rel[j]; if (m_cb->at(c) && (wchar_t)j != c) rel += c; @@ -112,17 +112,17 @@ unsigned int ZRCola::DBSource::character_bank::build_related_worker::process() for (size_type j = 0, j_end = m_cb->size(); j < j_end; j++) { if (i == j || rel.find((wchar_t)j) != wstring::npos) continue; - const ZRCola::DBSource::character &chr2 = *(m_cb->at(j).get()); + const auto &chr2 = *(m_cb->at(j).get()); if (&chr2 == NULL) continue; set::size_type comparisons = 0; matching.clear(); - for (set::const_iterator term = chr.terms.cbegin(), term_end = chr.terms.cend(); term != term_end; ++term) { + for (auto term = chr.terms.cbegin(), term_end = chr.terms.cend(); term != term_end; ++term) { // Test for ignored word(s). if (m_cb->m_ignore.find(*term) != m_cb->m_ignore.cend()) continue; - for (set::const_iterator term2 = chr2.terms.cbegin(), term2_end = chr2.terms.cend(); term2 != term2_end; ++term2) { + for (auto term2 = chr2.terms.cbegin(), term2_end = chr2.terms.cend(); term2 != term2_end; ++term2) { // Test for ignored word(s). if (m_cb->m_ignore.find(*term2) != m_cb->m_ignore.cend()) continue; @@ -134,7 +134,7 @@ unsigned int ZRCola::DBSource::character_bank::build_related_worker::process() if (comparisons) { // If 1/2 terms match, assume related. - set::size_type hits = matching.size(); + auto hits = matching.size(); if (hits*hits*2 >= comparisons) rel += chr2.chr; } @@ -205,7 +205,7 @@ void ZRCola::DBSource::character_desc_idx::parse_keywords(const wchar_t *str, se void ZRCola::DBSource::character_desc_idx::add_keywords(const set &terms, wchar_t chr, size_t sub) { - for (set::const_iterator term = terms.cbegin(), term_end = terms.cend(); term != term_end; ++term) { + for (auto term = terms.cbegin(), term_end = terms.cend(); term != term_end; ++term) { if (sub) { wstring::size_type j_end = term->size(); if (j_end >= sub) { diff --git a/ZRColaCompile/dbsource.h b/ZRColaCompile/dbsource.h index ccf0da3..dd0e2b7 100644 --- a/ZRColaCompile/dbsource.h +++ b/ZRColaCompile/dbsource.h @@ -256,7 +256,7 @@ namespace ZRCola { } else { // Append to existing keyword. std::vector &val = idx->second; - for (std::vector::iterator i = val.begin(), i_end = val.end(); ; ++i) { + for (auto i = val.cbegin(), i_end = val.cend(); ; ++i) { if (i == i_end) { // End-of-values reached. Append character. val.push_back(chr); diff --git a/ZRColaCompile/main.cpp b/ZRColaCompile/main.cpp index 7b5c692..9c01d2d 100644 --- a/ZRColaCompile/main.cpp +++ b/ZRColaCompile/main.cpp @@ -398,7 +398,7 @@ int _tmain(int argc, _TCHAR *argv[]) // Read character from the database. unique_ptr c(new ZRCola::DBSource::character); if (src.GetCharacter(rs, *c)) { - const ZRCola::DBSource::character &chr = *c.get(); + const auto &chr = *c.get(); chrs[chr.chr].swap(c); } else has_errors = true; @@ -415,7 +415,7 @@ int _tmain(int argc, _TCHAR *argv[]) // Phase 3: Parse characters and build index and data. for (size_t i = 0, i_end = chrs.size(); i < i_end; i++) { - const ZRCola::DBSource::character &chr = *(chrs[i].get()); + const auto &chr = *(chrs[i].get()); if (&chr == NULL) continue; // Add character to index and data. @@ -542,7 +542,7 @@ int _tmain(int argc, _TCHAR *argv[]) << "\"X-Generator: ZRColaCompile\\n\"" << endl; wstring_convert> conv; - for (set::const_iterator i = pot.cbegin(); i != pot.cend(); ++i) { + for (auto i = pot.cbegin(); i != pot.cend(); ++i) { // Convert UTF-16 to UTF-8 and escape. string t(conv.to_bytes(*i)), u; for (size_t i = 0, n = t.size(); i < n; i++) { diff --git a/lib/libZRCola/include/zrcola/character.h b/lib/libZRCola/include/zrcola/character.h index b9b0d7c..d050c55 100644 --- a/lib/libZRCola/include/zrcola/character.h +++ b/lib/libZRCola/include/zrcola/character.h @@ -452,7 +452,7 @@ inline std::ostream& operator <<(_In_ std::ostream& stream, _In_ const ZRCola::c stream << db.idxDscSub; // Write data count. - std::vector::size_type data_count = db.data.size(); + auto data_count = db.data.size(); #if defined(_WIN64) || defined(__x86_64__) || defined(__ppc64__) // 4G check if (data_count > 0xffffffff) { @@ -491,7 +491,7 @@ inline std::ostream& operator <<(_In_ std::ostream& stream, _In_ const ZRCola::c stream << db.idxRnk; // Write data count. - std::vector::size_type data_count = db.data.size(); + auto data_count = db.data.size(); #if defined(_WIN64) || defined(__x86_64__) || defined(__ppc64__) // 4G check if (data_count > 0xffffffff) { diff --git a/lib/libZRCola/include/zrcola/common.h b/lib/libZRCola/include/zrcola/common.h index 8f7ad63..d4b1174 100644 --- a/lib/libZRCola/include/zrcola/common.h +++ b/lib/libZRCola/include/zrcola/common.h @@ -557,7 +557,7 @@ template inline std::ostream& operator <<(_In_ std::ostream& stream, _In_ const ZRCola::index &idx) { // Write index count. - ZRCola::index::size_type idx_count = idx.size(); + auto idx_count = idx.size(); #if defined(_WIN64) || defined(__x86_64__) || defined(__ppc64__) // 4G check if (idx_count > 0xffffffff) { @@ -619,7 +619,7 @@ inline std::ostream& operator <<(_In_ std::ostream& stream, _In_ const ZRCola::t unsigned __int32 count; // Write index count. - ZRCola::textindex::size_type idx_count = idx.size(); + auto idx_count = idx.size(); #if defined(_WIN64) || defined(__x86_64__) || defined(__ppc64__) // 4G check if (idx_count > 0xffffffff) { @@ -636,7 +636,7 @@ inline std::ostream& operator <<(_In_ std::ostream& stream, _In_ const ZRCola::t stream.write((const char*)idx.data(), sizeof(ZRCola::textindex::value_type)*count); // Write key count. - std::vector::size_type key_count = idx.keys.size(); + auto key_count = idx.keys.size(); #if defined(_WIN64) || defined(__x86_64__) || defined(__ppc64__) // 4G check if (idx_count > 0xffffffff) { @@ -653,7 +653,7 @@ inline std::ostream& operator <<(_In_ std::ostream& stream, _In_ const ZRCola::t stream.write((const char*)idx.keys.data(), sizeof(std::vector::value_type)*count); // Write value count. - std::vector::size_type value_count = idx.values.size(); + auto value_count = idx.values.size(); #if defined(_WIN64) || defined(__x86_64__) || defined(__ppc64__) // 4G check if (idx_count > 0xffffffff) { diff --git a/lib/libZRCola/include/zrcola/language.h b/lib/libZRCola/include/zrcola/language.h index fa67f5a..22d7c84 100644 --- a/lib/libZRCola/include/zrcola/language.h +++ b/lib/libZRCola/include/zrcola/language.h @@ -280,7 +280,7 @@ inline std::ostream& operator <<(_In_ std::ostream& stream, _In_ const ZRCola::l #endif // Write data count. - std::vector::size_type data_count = db.data.size(); + auto data_count = db.data.size(); #if defined(_WIN64) || defined(__x86_64__) || defined(__ppc64__) // 4G check if (data_count > 0xffffffff) { @@ -351,7 +351,7 @@ inline std::ostream& operator <<(_In_ std::ostream& stream, _In_ const ZRCola::l stream << db.idxLng; // Write data count. - std::vector::size_type data_count = db.data.size(); + auto data_count = db.data.size(); #if defined(_WIN64) || defined(__x86_64__) || defined(__ppc64__) // 4G check if (data_count > 0xffffffff) { diff --git a/lib/libZRCola/include/zrcola/translate.h b/lib/libZRCola/include/zrcola/translate.h index 381b82f..5cf5dbc 100644 --- a/lib/libZRCola/include/zrcola/translate.h +++ b/lib/libZRCola/include/zrcola/translate.h @@ -267,7 +267,7 @@ inline std::ostream& operator <<(_In_ std::ostream& stream, _In_ const ZRCola::t stream << db.idxDecomp; // Write data count. - std::vector::size_type data_count = db.data.size(); + auto data_count = db.data.size(); #if defined(_WIN64) || defined(__x86_64__) || defined(__ppc64__) // 4G check if (data_count > 0xffffffff) { diff --git a/lib/libZRCola/src/character.cpp b/lib/libZRCola/src/character.cpp index a3ca121..a94a7b9 100644 --- a/lib/libZRCola/src/character.cpp +++ b/lib/libZRCola/src/character.cpp @@ -77,7 +77,7 @@ bool ZRCola::character_db::Search(_In_z_ const wchar_t *str, _In_ const std::set if (fn_abort && fn_abort(cookie)) return false; wchar_t c = data[i]; if (cats.find(GetCharCat(c)) != cats.end()) { - std::map::iterator idx = hits.find(c); + auto idx = hits.find(c); if (idx == hits.end()) { // New character. hits.insert(std::make_pair(data[i], 1.0/len)); @@ -95,7 +95,7 @@ bool ZRCola::character_db::Search(_In_z_ const wchar_t *str, _In_ const std::set if (fn_abort && fn_abort(cookie)) return false; wchar_t c = data[i]; if (cats.find(GetCharCat(c)) != cats.end()) { - std::map::iterator idx = hits_sub.find(c); + auto idx = hits_sub.find(c); if (idx == hits_sub.end()) { // New character. hits_sub.insert(std::make_pair(data[i], 1.0/len)); diff --git a/lib/libZRCola/src/translate.cpp b/lib/libZRCola/src/translate.cpp index fe83b44..1c9bb2a 100644 --- a/lib/libZRCola/src/translate.cpp +++ b/lib/libZRCola/src/translate.cpp @@ -34,7 +34,7 @@ void ZRCola::translation_db::Compose(_In_z_count_(inputMax) const wchar_t* input if (map) map->clear(); - indexComp::size_type compositionsCount = idxComp.size(); + auto compositionsCount = idxComp.size(); for (size_t i = 0; i < inputMax;) { // Find the longest matching composition at i-th character. @@ -116,7 +116,7 @@ void ZRCola::translation_db::Decompose(_In_z_count_(inputMax) const wchar_t* inp if (map) map->clear(); - indexDecomp::size_type decompositionsCount = idxDecomp.size(); + auto decompositionsCount = idxDecomp.size(); for (size_t i = 0; i < inputMax;) { // Find whether the character can be decomposed. diff --git a/lib/libZRColaUI/include/zrcolaui/chargroup.h b/lib/libZRColaUI/include/zrcolaui/chargroup.h index 5976437..b2cc82a 100644 --- a/lib/libZRColaUI/include/zrcolaui/chargroup.h +++ b/lib/libZRColaUI/include/zrcolaui/chargroup.h @@ -165,7 +165,7 @@ inline std::ostream& operator <<(_In_ std::ostream& stream, _In_ const ZRCola::c stream << db.idxRnk; // Write data count. - std::vector::size_type data_count = db.data.size(); + auto data_count = db.data.size(); #if defined(_WIN64) || defined(__x86_64__) || defined(__ppc64__) // 4G check if (data_count > 0xffffffff) { diff --git a/lib/libZRColaUI/include/zrcolaui/keyboard.h b/lib/libZRColaUI/include/zrcolaui/keyboard.h index fee2114..620bae3 100644 --- a/lib/libZRColaUI/include/zrcolaui/keyboard.h +++ b/lib/libZRColaUI/include/zrcolaui/keyboard.h @@ -264,7 +264,7 @@ inline std::ostream& operator <<(_In_ std::ostream& stream, _In_ const ZRCola::k stream << db.idxKey; // Write data count. - std::vector::size_type data_count = db.data.size(); + auto data_count = db.data.size(); #if defined(_WIN64) || defined(__x86_64__) || defined(__ppc64__) // 4G check if (data_count > 0xffffffff) {