diff --git a/src/config/configfile.cpp b/src/config/configfile.cpp index 3fb32316..3fb89ef4 100644 --- a/src/config/configfile.cpp +++ b/src/config/configfile.cpp @@ -97,10 +97,10 @@ ConfigFile::ConfigFile(char *argv0, bool readonly) : noWriteAccess(readonly) cacheDir += "cache\\"; //create directories on first start of app - mkdir(configFileName.c_str()); - mkdir(logDir.c_str()); - mkdir(dataDir.c_str()); - mkdir(cacheDir.c_str()); + _mkdir(configFileName.c_str()); + _mkdir(logDir.c_str()); + _mkdir(dataDir.c_str()); + _mkdir(cacheDir.c_str()); #else //define app-dir diff --git a/src/core/avatarmanager.h b/src/core/avatarmanager.h index 2e351515..aa3f92bd 100644 --- a/src/core/avatarmanager.h +++ b/src/core/avatarmanager.h @@ -59,9 +59,9 @@ public: bool GetHashForAvatar(const std::string &fileName, MD5Buf &md5buf) const; bool GetAvatarFileName(const MD5Buf &md5buf, std::string &fileName) const; bool HasAvatar(const MD5Buf &md5buf) const; - bool StoreAvatarInCache(const MD5Buf &md5buf, AvatarFileType avatarFileType, const unsigned char *data, unsigned size, bool upload); + bool StoreAvatarInCache(const MD5Buf &md5buf, AvatarFileType avatarFileType, const unsigned char *data, size_t size, bool upload); - static bool IsValidAvatarFileType(AvatarFileType avatarFileType, const unsigned char *fileHeader, unsigned fileHeaderSize); + static bool IsValidAvatarFileType(AvatarFileType avatarFileType, const unsigned char *fileHeader, size_t fileHeaderSize); void RemoveOldAvatarCacheEntries(); diff --git a/src/core/common/avatarmanager.cpp b/src/core/common/avatarmanager.cpp index 330bc55e..ed5639be 100644 --- a/src/core/common/avatarmanager.cpp +++ b/src/core/common/avatarmanager.cpp @@ -341,7 +341,7 @@ AvatarManager::HasAvatar(const MD5Buf &md5buf) const } bool -AvatarManager::StoreAvatarInCache(const MD5Buf &md5buf, AvatarFileType avatarFileType, const unsigned char *data, unsigned size, bool upload) +AvatarManager::StoreAvatarInCache(const MD5Buf &md5buf, AvatarFileType avatarFileType, const unsigned char *data, size_t size, bool upload) { bool retVal = false; string cacheDir; @@ -380,7 +380,7 @@ AvatarManager::StoreAvatarInCache(const MD5Buf &md5buf, AvatarFileType avatarFil } bool -AvatarManager::IsValidAvatarFileType(AvatarFileType avatarFileType, const unsigned char *fileHeader, unsigned fileHeaderSize) +AvatarManager::IsValidAvatarFileType(AvatarFileType avatarFileType, const unsigned char *fileHeader, size_t fileHeaderSize) { bool validType = false; diff --git a/src/core/common/crypthelper.cpp b/src/core/common/crypthelper.cpp index 5599125a..e96fde9c 100644 --- a/src/core/common/crypthelper.cpp +++ b/src/core/common/crypthelper.cpp @@ -166,7 +166,7 @@ CryptHelper::MD5Sum(const std::string &fileName, MD5Buf &buf) if (file) { // Calculate MD5 sum of file. unsigned char *readBuf = new unsigned char[8192]; - int numBytes; + size_t numBytes; #ifdef HAVE_OPENSSL MD5_CTX context; diff --git a/src/db/common/serverdbgeneric.cpp b/src/db/common/serverdbgeneric.cpp index c32233bf..3efdd325 100644 --- a/src/db/common/serverdbgeneric.cpp +++ b/src/db/common/serverdbgeneric.cpp @@ -87,7 +87,7 @@ ServerDBGeneric::EndGame(unsigned /*requestId*/) } void -ServerDBGeneric::AsyncReportAvatar(unsigned requestId, unsigned replyId, DB_id /*reportedPlayerId*/, const std::string &/*avatarHash*/, const std::string &/*avatarType*/, DB_id */*byPlayerId*/) +ServerDBGeneric::AsyncReportAvatar(unsigned requestId, unsigned replyId, DB_id /*reportedPlayerId*/, const std::string &/*avatarHash*/, const std::string &/*avatarType*/, DB_id * /*byPlayerId*/) { m_ioService->post(boost::bind(&ServerDBCallback::ReportAvatarFailed, &m_callback, requestId, replyId)); } diff --git a/src/db/serverdbnoaction.h b/src/db/serverdbnoaction.h index 51c5d261..f40e298f 100644 --- a/src/db/serverdbnoaction.h +++ b/src/db/serverdbnoaction.h @@ -45,7 +45,7 @@ public: virtual void SetGamePlayerPlace(unsigned /*requestId*/, DB_id /*playerId*/, unsigned /*place*/) {} virtual void EndGame(unsigned /*requestId*/) {} - virtual void AsyncReportAvatar(unsigned /*requestId*/, unsigned /*replyId*/, DB_id /*reportedPlayerId*/, const std::string &/*avatarHash*/, const std::string &/*avatarType*/, DB_id */*byPlayerId*/) {} + virtual void AsyncReportAvatar(unsigned /*requestId*/, unsigned /*replyId*/, DB_id /*reportedPlayerId*/, const std::string &/*avatarHash*/, const std::string &/*avatarType*/, DB_id * /*byPlayerId*/) {} }; #endif // _SERVERDBNOACTION_H_ diff --git a/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp b/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp index 5380ba92..02274fc8 100644 --- a/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp +++ b/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp @@ -1675,248 +1675,248 @@ QString gameLobbyDialogImpl::getFullCountryString(QString cs) // Initialise map of country strings, if needed. if (countryStringMap.empty()) { countryStringMap.insert(CountryStringMap::value_type("AF", tr("Afghanistan"))); - countryStringMap.insert(CountryStringMap::value_type("AX", tr("ALand Islands"))); - countryStringMap.insert(CountryStringMap::value_type("AL", tr("Albania"))); - countryStringMap.insert(CountryStringMap::value_type("DZ", tr("Algeria"))); - countryStringMap.insert(CountryStringMap::value_type("AS", tr("American Samoa"))); - countryStringMap.insert(CountryStringMap::value_type("AD", tr("Andorra"))); - countryStringMap.insert(CountryStringMap::value_type("AO", tr("Angola"))); - countryStringMap.insert(CountryStringMap::value_type("AI", tr("Anguilla"))); - countryStringMap.insert(CountryStringMap::value_type("AQ", tr("Antarctica"))); - countryStringMap.insert(CountryStringMap::value_type("AG", tr("Antigua And Barbuda"))); - countryStringMap.insert(CountryStringMap::value_type("AR", tr("Argentina"))); - countryStringMap.insert(CountryStringMap::value_type("AM", tr("Armenia"))); - countryStringMap.insert(CountryStringMap::value_type("AW", tr("Aruba"))); - countryStringMap.insert(CountryStringMap::value_type("AU", tr("Australia"))); - countryStringMap.insert(CountryStringMap::value_type("AT", tr("Austria"))); - countryStringMap.insert(CountryStringMap::value_type("AZ", tr("Azerbaijan"))); - countryStringMap.insert(CountryStringMap::value_type("BS", tr("Bahamas"))); - countryStringMap.insert(CountryStringMap::value_type("BH", tr("Bahrain"))); - countryStringMap.insert(CountryStringMap::value_type("BD", tr("Bangladesh"))); - countryStringMap.insert(CountryStringMap::value_type("BB", tr("Barbados"))); - countryStringMap.insert(CountryStringMap::value_type("BY", tr("Belarus"))); - countryStringMap.insert(CountryStringMap::value_type("BE", tr("Belgium"))); - countryStringMap.insert(CountryStringMap::value_type("BZ", tr("Belize"))); - countryStringMap.insert(CountryStringMap::value_type("BJ", tr("Benin"))); - countryStringMap.insert(CountryStringMap::value_type("BM", tr("Bermuda"))); - countryStringMap.insert(CountryStringMap::value_type("BT", tr("Bhutan"))); - countryStringMap.insert(CountryStringMap::value_type("BO", tr("Bolivia"))); - countryStringMap.insert(CountryStringMap::value_type("BA", tr("Bosnia And Herzegovina"))); - countryStringMap.insert(CountryStringMap::value_type("BW", tr("Botswana"))); - countryStringMap.insert(CountryStringMap::value_type("BV", tr("Bouvet Island"))); - countryStringMap.insert(CountryStringMap::value_type("BR", tr("Brazil"))); - countryStringMap.insert(CountryStringMap::value_type("IO", tr("British Indian Ocean Territory"))); - countryStringMap.insert(CountryStringMap::value_type("BN", tr("Brunei Darussalam"))); - countryStringMap.insert(CountryStringMap::value_type("BG", tr("Bulgaria"))); - countryStringMap.insert(CountryStringMap::value_type("BF", tr("Burkina Faso"))); - countryStringMap.insert(CountryStringMap::value_type("BI", tr("Burundi"))); - countryStringMap.insert(CountryStringMap::value_type("KH", tr("Cambodia"))); - countryStringMap.insert(CountryStringMap::value_type("CM", tr("Cameroon"))); - countryStringMap.insert(CountryStringMap::value_type("CA", tr("Canada"))); - countryStringMap.insert(CountryStringMap::value_type("CV", tr("Cape Verde"))); - countryStringMap.insert(CountryStringMap::value_type("KY", tr("Cayman Islands"))); - countryStringMap.insert(CountryStringMap::value_type("CF", tr("Central African Republic"))); - countryStringMap.insert(CountryStringMap::value_type("TD", tr("Chad"))); - countryStringMap.insert(CountryStringMap::value_type("CL", tr("Chile"))); - countryStringMap.insert(CountryStringMap::value_type("CN", tr("China"))); - countryStringMap.insert(CountryStringMap::value_type("CX", tr("Christmas Island"))); - countryStringMap.insert(CountryStringMap::value_type("CC", tr("Cocos (Keeling) Islands"))); - countryStringMap.insert(CountryStringMap::value_type("CO", tr("Colombia"))); - countryStringMap.insert(CountryStringMap::value_type("KM", tr("Comoros"))); - countryStringMap.insert(CountryStringMap::value_type("CG", tr("Congo"))); - countryStringMap.insert(CountryStringMap::value_type("CD", tr("Congo, The Democratic Republic Of The"))); - countryStringMap.insert(CountryStringMap::value_type("CK", tr("Cook Islands"))); - countryStringMap.insert(CountryStringMap::value_type("CR", tr("Costa Rica"))); - countryStringMap.insert(CountryStringMap::value_type("CI", tr("Cote D'Ivoire"))); - countryStringMap.insert(CountryStringMap::value_type("HR", tr("Croatia"))); - countryStringMap.insert(CountryStringMap::value_type("CU", tr("Cuba"))); - countryStringMap.insert(CountryStringMap::value_type("CY", tr("Cyprus"))); - countryStringMap.insert(CountryStringMap::value_type("CZ", tr("Czech Republic"))); - countryStringMap.insert(CountryStringMap::value_type("DK", tr("Denmark"))); - countryStringMap.insert(CountryStringMap::value_type("DJ", tr("Djibouti"))); - countryStringMap.insert(CountryStringMap::value_type("DM", tr("Dominica"))); - countryStringMap.insert(CountryStringMap::value_type("DO", tr("Dominican Republic"))); - countryStringMap.insert(CountryStringMap::value_type("EC", tr("Ecuador"))); - countryStringMap.insert(CountryStringMap::value_type("EG", tr("Egypt"))); - countryStringMap.insert(CountryStringMap::value_type("SV", tr("El Salvador"))); - countryStringMap.insert(CountryStringMap::value_type("GQ", tr("Equatorial Guinea"))); - countryStringMap.insert(CountryStringMap::value_type("ER", tr("Eritrea"))); - countryStringMap.insert(CountryStringMap::value_type("EE", tr("Estonia"))); - countryStringMap.insert(CountryStringMap::value_type("ET", tr("Ethiopia"))); - countryStringMap.insert(CountryStringMap::value_type("FK", tr("Falkland Islands (Malvinas)"))); - countryStringMap.insert(CountryStringMap::value_type("FO", tr("Faroe Islands"))); - countryStringMap.insert(CountryStringMap::value_type("FJ", tr("Fiji"))); - countryStringMap.insert(CountryStringMap::value_type("FI", tr("Finland"))); - countryStringMap.insert(CountryStringMap::value_type("FR", tr("France"))); - countryStringMap.insert(CountryStringMap::value_type("GF", tr("French Guiana"))); - countryStringMap.insert(CountryStringMap::value_type("PF", tr("French Polynesia"))); - countryStringMap.insert(CountryStringMap::value_type("TF", tr("French Southern Territories"))); - countryStringMap.insert(CountryStringMap::value_type("GA", tr("Gabon"))); - countryStringMap.insert(CountryStringMap::value_type("GM", tr("Gambia"))); - countryStringMap.insert(CountryStringMap::value_type("GE", tr("Georgia"))); - countryStringMap.insert(CountryStringMap::value_type("DE", tr("Germany"))); - countryStringMap.insert(CountryStringMap::value_type("GH", tr("Ghana"))); - countryStringMap.insert(CountryStringMap::value_type("GI", tr("Gibraltar"))); - countryStringMap.insert(CountryStringMap::value_type("GR", tr("Greece"))); - countryStringMap.insert(CountryStringMap::value_type("GL", tr("Greenland"))); - countryStringMap.insert(CountryStringMap::value_type("GD", tr("Grenada"))); - countryStringMap.insert(CountryStringMap::value_type("GP", tr("Guadeloupe"))); - countryStringMap.insert(CountryStringMap::value_type("GU", tr("Guam"))); - countryStringMap.insert(CountryStringMap::value_type("GT", tr("Guatemala"))); - countryStringMap.insert(CountryStringMap::value_type("GG", tr("Guernsey"))); - countryStringMap.insert(CountryStringMap::value_type("GN", tr("Guinea"))); - countryStringMap.insert(CountryStringMap::value_type("GW", tr("Guinea-Bissau"))); - countryStringMap.insert(CountryStringMap::value_type("GY", tr("Guyana"))); - countryStringMap.insert(CountryStringMap::value_type("HT", tr("Haiti"))); - countryStringMap.insert(CountryStringMap::value_type("HM", tr("Heard Island And Mcdonald Islands"))); - countryStringMap.insert(CountryStringMap::value_type("VA", tr("Holy See (Vatican City State)"))); - countryStringMap.insert(CountryStringMap::value_type("HN", tr("Honduras"))); - countryStringMap.insert(CountryStringMap::value_type("HK", tr("Hong Kong"))); - countryStringMap.insert(CountryStringMap::value_type("HU", tr("Hungary"))); - countryStringMap.insert(CountryStringMap::value_type("IS", tr("Iceland"))); - countryStringMap.insert(CountryStringMap::value_type("IN", tr("India"))); - countryStringMap.insert(CountryStringMap::value_type("ID", tr("Indonesia"))); - countryStringMap.insert(CountryStringMap::value_type("IR", tr("Iran, Islamic Republic Of"))); - countryStringMap.insert(CountryStringMap::value_type("IQ", tr("Iraq"))); - countryStringMap.insert(CountryStringMap::value_type("IE", tr("Ireland"))); - countryStringMap.insert(CountryStringMap::value_type("IM", tr("Isle Of Man"))); - countryStringMap.insert(CountryStringMap::value_type("IL", tr("Israel"))); - countryStringMap.insert(CountryStringMap::value_type("IT", tr("Italy"))); - countryStringMap.insert(CountryStringMap::value_type("JM", tr("Jamaica"))); - countryStringMap.insert(CountryStringMap::value_type("JP", tr("Japan"))); - countryStringMap.insert(CountryStringMap::value_type("JE", tr("Jersey"))); - countryStringMap.insert(CountryStringMap::value_type("JO", tr("Jordan"))); - countryStringMap.insert(CountryStringMap::value_type("KZ", tr("Kazakhstan"))); - countryStringMap.insert(CountryStringMap::value_type("KE", tr("Kenya"))); - countryStringMap.insert(CountryStringMap::value_type("KI", tr("Kiribati"))); - countryStringMap.insert(CountryStringMap::value_type("KP", tr("Korea, Democratic People'S Republic Of"))); - countryStringMap.insert(CountryStringMap::value_type("KR", tr("Korea, Republic Of"))); - countryStringMap.insert(CountryStringMap::value_type("KW", tr("Kuwait"))); - countryStringMap.insert(CountryStringMap::value_type("KG", tr("Kyrgyzstan"))); - countryStringMap.insert(CountryStringMap::value_type("LA", tr("Lao People'S Democratic Republic"))); - countryStringMap.insert(CountryStringMap::value_type("LV", tr("Latvia"))); - countryStringMap.insert(CountryStringMap::value_type("LB", tr("Lebanon"))); - countryStringMap.insert(CountryStringMap::value_type("LS", tr("Lesotho"))); - countryStringMap.insert(CountryStringMap::value_type("LR", tr("Liberia"))); - countryStringMap.insert(CountryStringMap::value_type("LY", tr("Libyan Arab Jamahiriya"))); - countryStringMap.insert(CountryStringMap::value_type("LI", tr("Liechtenstein"))); - countryStringMap.insert(CountryStringMap::value_type("LT", tr("Lithuania"))); - countryStringMap.insert(CountryStringMap::value_type("LU", tr("Luxembourg"))); - countryStringMap.insert(CountryStringMap::value_type("MO", tr("Macao"))); - countryStringMap.insert(CountryStringMap::value_type("MK", tr("Macedonia, The Former Yugoslav Republic Of"))); - countryStringMap.insert(CountryStringMap::value_type("MG", tr("Madagascar"))); - countryStringMap.insert(CountryStringMap::value_type("MW", tr("Malawi"))); - countryStringMap.insert(CountryStringMap::value_type("MY", tr("Malaysia"))); - countryStringMap.insert(CountryStringMap::value_type("MV", tr("Maldives"))); - countryStringMap.insert(CountryStringMap::value_type("ML", tr("Mali"))); - countryStringMap.insert(CountryStringMap::value_type("MT", tr("Malta"))); - countryStringMap.insert(CountryStringMap::value_type("MH", tr("Marshall Islands"))); - countryStringMap.insert(CountryStringMap::value_type("MQ", tr("Martinique"))); - countryStringMap.insert(CountryStringMap::value_type("MR", tr("Mauritania"))); - countryStringMap.insert(CountryStringMap::value_type("MU", tr("Mauritius"))); - countryStringMap.insert(CountryStringMap::value_type("YT", tr("Mayotte"))); - countryStringMap.insert(CountryStringMap::value_type("MX", tr("Mexico"))); - countryStringMap.insert(CountryStringMap::value_type("FM", tr("Micronesia, Federated States Of"))); - countryStringMap.insert(CountryStringMap::value_type("MD", tr("Moldova, Republic Of"))); - countryStringMap.insert(CountryStringMap::value_type("MC", tr("Monaco"))); - countryStringMap.insert(CountryStringMap::value_type("MN", tr("Mongolia"))); - countryStringMap.insert(CountryStringMap::value_type("MS", tr("Montserrat"))); - countryStringMap.insert(CountryStringMap::value_type("MA", tr("Morocco"))); - countryStringMap.insert(CountryStringMap::value_type("MZ", tr("Mozambique"))); - countryStringMap.insert(CountryStringMap::value_type("MM", tr("Myanmar"))); - countryStringMap.insert(CountryStringMap::value_type("NA", tr("Namibia"))); - countryStringMap.insert(CountryStringMap::value_type("NR", tr("Nauru"))); - countryStringMap.insert(CountryStringMap::value_type("NP", tr("Nepal"))); - countryStringMap.insert(CountryStringMap::value_type("NL", tr("Netherlands"))); - countryStringMap.insert(CountryStringMap::value_type("AN", tr("Netherlands Antilles"))); - countryStringMap.insert(CountryStringMap::value_type("NC", tr("New Caledonia"))); - countryStringMap.insert(CountryStringMap::value_type("NZ", tr("New Zealand"))); - countryStringMap.insert(CountryStringMap::value_type("NI", tr("Nicaragua"))); - countryStringMap.insert(CountryStringMap::value_type("NE", tr("Niger"))); - countryStringMap.insert(CountryStringMap::value_type("NG", tr("Nigeria"))); - countryStringMap.insert(CountryStringMap::value_type("NU", tr("Niue"))); - countryStringMap.insert(CountryStringMap::value_type("NF", tr("Norfolk Island"))); - countryStringMap.insert(CountryStringMap::value_type("MP", tr("Northern Mariana Islands"))); - countryStringMap.insert(CountryStringMap::value_type("NO", tr("Norway"))); - countryStringMap.insert(CountryStringMap::value_type("OM", tr("Oman"))); - countryStringMap.insert(CountryStringMap::value_type("PK", tr("Pakistan"))); - countryStringMap.insert(CountryStringMap::value_type("PW", tr("Palau"))); - countryStringMap.insert(CountryStringMap::value_type("PS", tr("Palestinian Territory, Occupied"))); - countryStringMap.insert(CountryStringMap::value_type("PA", tr("Panama"))); - countryStringMap.insert(CountryStringMap::value_type("PG", tr("Papua New Guinea"))); - countryStringMap.insert(CountryStringMap::value_type("PY", tr("Paraguay"))); - countryStringMap.insert(CountryStringMap::value_type("PE", tr("Peru"))); - countryStringMap.insert(CountryStringMap::value_type("PH", tr("Philippines"))); - countryStringMap.insert(CountryStringMap::value_type("PN", tr("Pitcairn"))); - countryStringMap.insert(CountryStringMap::value_type("PL", tr("Poland"))); - countryStringMap.insert(CountryStringMap::value_type("PT", tr("Portugal"))); - countryStringMap.insert(CountryStringMap::value_type("PR", tr("Puerto Rico"))); - countryStringMap.insert(CountryStringMap::value_type("QA", tr("Qatar"))); - countryStringMap.insert(CountryStringMap::value_type("RE", tr("Reunion"))); - countryStringMap.insert(CountryStringMap::value_type("RO", tr("Romania"))); - countryStringMap.insert(CountryStringMap::value_type("RU", tr("Russian Federation"))); - countryStringMap.insert(CountryStringMap::value_type("RW", tr("Rwanda"))); - countryStringMap.insert(CountryStringMap::value_type("SH", tr("Saint Helena"))); - countryStringMap.insert(CountryStringMap::value_type("KN", tr("Saint Kitts And Nevis"))); - countryStringMap.insert(CountryStringMap::value_type("LC", tr("Saint Lucia"))); - countryStringMap.insert(CountryStringMap::value_type("PM", tr("Saint Pierre And Miquelon"))); - countryStringMap.insert(CountryStringMap::value_type("VC", tr("Saint Vincent And The Grenadines"))); - countryStringMap.insert(CountryStringMap::value_type("WS", tr("Samoa"))); - countryStringMap.insert(CountryStringMap::value_type("SM", tr("San Marino"))); - countryStringMap.insert(CountryStringMap::value_type("ST", tr("Sao Tome And Principe"))); - countryStringMap.insert(CountryStringMap::value_type("SA", tr("Saudi Arabia"))); - countryStringMap.insert(CountryStringMap::value_type("SN", tr("Senegal"))); - countryStringMap.insert(CountryStringMap::value_type("CS", tr("Serbia And Montenegro"))); - countryStringMap.insert(CountryStringMap::value_type("SC", tr("Seychelles"))); - countryStringMap.insert(CountryStringMap::value_type("SL", tr("Sierra Leone"))); - countryStringMap.insert(CountryStringMap::value_type("SG", tr("Singapore"))); - countryStringMap.insert(CountryStringMap::value_type("SK", tr("Slovakia"))); - countryStringMap.insert(CountryStringMap::value_type("SI", tr("Slovenia"))); - countryStringMap.insert(CountryStringMap::value_type("SB", tr("Solomon Islands"))); - countryStringMap.insert(CountryStringMap::value_type("SO", tr("Somalia"))); - countryStringMap.insert(CountryStringMap::value_type("ZA", tr("South Africa"))); - countryStringMap.insert(CountryStringMap::value_type("GS", tr("South Georgia And The South Sandwich Islands"))); - countryStringMap.insert(CountryStringMap::value_type("ES", tr("Spain"))); - countryStringMap.insert(CountryStringMap::value_type("LK", tr("Sri Lanka"))); - countryStringMap.insert(CountryStringMap::value_type("SD", tr("Sudan"))); - countryStringMap.insert(CountryStringMap::value_type("SR", tr("Suriname"))); - countryStringMap.insert(CountryStringMap::value_type("SJ", tr("Svalbard And Jan Mayen"))); - countryStringMap.insert(CountryStringMap::value_type("SZ", tr("Swaziland"))); - countryStringMap.insert(CountryStringMap::value_type("SE", tr("Sweden"))); - countryStringMap.insert(CountryStringMap::value_type("CH", tr("Switzerland"))); - countryStringMap.insert(CountryStringMap::value_type("SY", tr("Syrian Arab Republic"))); - countryStringMap.insert(CountryStringMap::value_type("TW", tr("Taiwan, Province Of China"))); - countryStringMap.insert(CountryStringMap::value_type("TJ", tr("Tajikistan"))); - countryStringMap.insert(CountryStringMap::value_type("TZ", tr("Tanzania, United Republic Of"))); - countryStringMap.insert(CountryStringMap::value_type("TH", tr("Thailand"))); - countryStringMap.insert(CountryStringMap::value_type("TL", tr("Timor-Leste"))); - countryStringMap.insert(CountryStringMap::value_type("TG", tr("Togo"))); - countryStringMap.insert(CountryStringMap::value_type("TK", tr("Tokelau"))); - countryStringMap.insert(CountryStringMap::value_type("TO", tr("Tonga"))); - countryStringMap.insert(CountryStringMap::value_type("TT", tr("Trinidad And Tobago"))); - countryStringMap.insert(CountryStringMap::value_type("TN", tr("Tunisia"))); - countryStringMap.insert(CountryStringMap::value_type("TR", tr("Turkey"))); - countryStringMap.insert(CountryStringMap::value_type("TM", tr("Turkmenistan"))); - countryStringMap.insert(CountryStringMap::value_type("TC", tr("Turks And Caicos Islands"))); - countryStringMap.insert(CountryStringMap::value_type("TV", tr("Tuvalu"))); - countryStringMap.insert(CountryStringMap::value_type("UG", tr("Uganda"))); - countryStringMap.insert(CountryStringMap::value_type("UA", tr("Ukraine"))); - countryStringMap.insert(CountryStringMap::value_type("AE", tr("United Arab Emirates"))); - countryStringMap.insert(CountryStringMap::value_type("GB", tr("United Kingdom"))); - countryStringMap.insert(CountryStringMap::value_type("US", tr("United States"))); - countryStringMap.insert(CountryStringMap::value_type("UM", tr("United States Minor Outlying Islands"))); - countryStringMap.insert(CountryStringMap::value_type("UY", tr("Uruguay"))); - countryStringMap.insert(CountryStringMap::value_type("UZ", tr("Uzbekistan"))); - countryStringMap.insert(CountryStringMap::value_type("VU", tr("Vanuatu"))); - countryStringMap.insert(CountryStringMap::value_type("VE", tr("Venezuela"))); - countryStringMap.insert(CountryStringMap::value_type("VN", tr("Viet Nam"))); - countryStringMap.insert(CountryStringMap::value_type("VG", tr("Virgin Islands, British"))); - countryStringMap.insert(CountryStringMap::value_type("VI", tr("Virgin Islands, U.S."))); - countryStringMap.insert(CountryStringMap::value_type("WF", tr("Wallis And Futuna"))); - countryStringMap.insert(CountryStringMap::value_type("EH", tr("Western Sahara"))); - countryStringMap.insert(CountryStringMap::value_type("YE", tr("Yemen"))); - countryStringMap.insert(CountryStringMap::value_type("ZM", tr("Zambia"))); - countryStringMap.insert(CountryStringMap::value_type("ZW", tr("Zimbabwe"))); + countryStringMap.insert(CountryStringMap::value_type("AX", tr("ALand Islands"))); + countryStringMap.insert(CountryStringMap::value_type("AL", tr("Albania"))); + countryStringMap.insert(CountryStringMap::value_type("DZ", tr("Algeria"))); + countryStringMap.insert(CountryStringMap::value_type("AS", tr("American Samoa"))); + countryStringMap.insert(CountryStringMap::value_type("AD", tr("Andorra"))); + countryStringMap.insert(CountryStringMap::value_type("AO", tr("Angola"))); + countryStringMap.insert(CountryStringMap::value_type("AI", tr("Anguilla"))); + countryStringMap.insert(CountryStringMap::value_type("AQ", tr("Antarctica"))); + countryStringMap.insert(CountryStringMap::value_type("AG", tr("Antigua And Barbuda"))); + countryStringMap.insert(CountryStringMap::value_type("AR", tr("Argentina"))); + countryStringMap.insert(CountryStringMap::value_type("AM", tr("Armenia"))); + countryStringMap.insert(CountryStringMap::value_type("AW", tr("Aruba"))); + countryStringMap.insert(CountryStringMap::value_type("AU", tr("Australia"))); + countryStringMap.insert(CountryStringMap::value_type("AT", tr("Austria"))); + countryStringMap.insert(CountryStringMap::value_type("AZ", tr("Azerbaijan"))); + countryStringMap.insert(CountryStringMap::value_type("BS", tr("Bahamas"))); + countryStringMap.insert(CountryStringMap::value_type("BH", tr("Bahrain"))); + countryStringMap.insert(CountryStringMap::value_type("BD", tr("Bangladesh"))); + countryStringMap.insert(CountryStringMap::value_type("BB", tr("Barbados"))); + countryStringMap.insert(CountryStringMap::value_type("BY", tr("Belarus"))); + countryStringMap.insert(CountryStringMap::value_type("BE", tr("Belgium"))); + countryStringMap.insert(CountryStringMap::value_type("BZ", tr("Belize"))); + countryStringMap.insert(CountryStringMap::value_type("BJ", tr("Benin"))); + countryStringMap.insert(CountryStringMap::value_type("BM", tr("Bermuda"))); + countryStringMap.insert(CountryStringMap::value_type("BT", tr("Bhutan"))); + countryStringMap.insert(CountryStringMap::value_type("BO", tr("Bolivia"))); + countryStringMap.insert(CountryStringMap::value_type("BA", tr("Bosnia And Herzegovina"))); + countryStringMap.insert(CountryStringMap::value_type("BW", tr("Botswana"))); + countryStringMap.insert(CountryStringMap::value_type("BV", tr("Bouvet Island"))); + countryStringMap.insert(CountryStringMap::value_type("BR", tr("Brazil"))); + countryStringMap.insert(CountryStringMap::value_type("IO", tr("British Indian Ocean Territory"))); + countryStringMap.insert(CountryStringMap::value_type("BN", tr("Brunei Darussalam"))); + countryStringMap.insert(CountryStringMap::value_type("BG", tr("Bulgaria"))); + countryStringMap.insert(CountryStringMap::value_type("BF", tr("Burkina Faso"))); + countryStringMap.insert(CountryStringMap::value_type("BI", tr("Burundi"))); + countryStringMap.insert(CountryStringMap::value_type("KH", tr("Cambodia"))); + countryStringMap.insert(CountryStringMap::value_type("CM", tr("Cameroon"))); + countryStringMap.insert(CountryStringMap::value_type("CA", tr("Canada"))); + countryStringMap.insert(CountryStringMap::value_type("CV", tr("Cape Verde"))); + countryStringMap.insert(CountryStringMap::value_type("KY", tr("Cayman Islands"))); + countryStringMap.insert(CountryStringMap::value_type("CF", tr("Central African Republic"))); + countryStringMap.insert(CountryStringMap::value_type("TD", tr("Chad"))); + countryStringMap.insert(CountryStringMap::value_type("CL", tr("Chile"))); + countryStringMap.insert(CountryStringMap::value_type("CN", tr("China"))); + countryStringMap.insert(CountryStringMap::value_type("CX", tr("Christmas Island"))); + countryStringMap.insert(CountryStringMap::value_type("CC", tr("Cocos (Keeling) Islands"))); + countryStringMap.insert(CountryStringMap::value_type("CO", tr("Colombia"))); + countryStringMap.insert(CountryStringMap::value_type("KM", tr("Comoros"))); + countryStringMap.insert(CountryStringMap::value_type("CG", tr("Congo"))); + countryStringMap.insert(CountryStringMap::value_type("CD", tr("Congo, The Democratic Republic Of The"))); + countryStringMap.insert(CountryStringMap::value_type("CK", tr("Cook Islands"))); + countryStringMap.insert(CountryStringMap::value_type("CR", tr("Costa Rica"))); + countryStringMap.insert(CountryStringMap::value_type("CI", tr("Cote D'Ivoire"))); + countryStringMap.insert(CountryStringMap::value_type("HR", tr("Croatia"))); + countryStringMap.insert(CountryStringMap::value_type("CU", tr("Cuba"))); + countryStringMap.insert(CountryStringMap::value_type("CY", tr("Cyprus"))); + countryStringMap.insert(CountryStringMap::value_type("CZ", tr("Czech Republic"))); + countryStringMap.insert(CountryStringMap::value_type("DK", tr("Denmark"))); + countryStringMap.insert(CountryStringMap::value_type("DJ", tr("Djibouti"))); + countryStringMap.insert(CountryStringMap::value_type("DM", tr("Dominica"))); + countryStringMap.insert(CountryStringMap::value_type("DO", tr("Dominican Republic"))); + countryStringMap.insert(CountryStringMap::value_type("EC", tr("Ecuador"))); + countryStringMap.insert(CountryStringMap::value_type("EG", tr("Egypt"))); + countryStringMap.insert(CountryStringMap::value_type("SV", tr("El Salvador"))); + countryStringMap.insert(CountryStringMap::value_type("GQ", tr("Equatorial Guinea"))); + countryStringMap.insert(CountryStringMap::value_type("ER", tr("Eritrea"))); + countryStringMap.insert(CountryStringMap::value_type("EE", tr("Estonia"))); + countryStringMap.insert(CountryStringMap::value_type("ET", tr("Ethiopia"))); + countryStringMap.insert(CountryStringMap::value_type("FK", tr("Falkland Islands (Malvinas)"))); + countryStringMap.insert(CountryStringMap::value_type("FO", tr("Faroe Islands"))); + countryStringMap.insert(CountryStringMap::value_type("FJ", tr("Fiji"))); + countryStringMap.insert(CountryStringMap::value_type("FI", tr("Finland"))); + countryStringMap.insert(CountryStringMap::value_type("FR", tr("France"))); + countryStringMap.insert(CountryStringMap::value_type("GF", tr("French Guiana"))); + countryStringMap.insert(CountryStringMap::value_type("PF", tr("French Polynesia"))); + countryStringMap.insert(CountryStringMap::value_type("TF", tr("French Southern Territories"))); + countryStringMap.insert(CountryStringMap::value_type("GA", tr("Gabon"))); + countryStringMap.insert(CountryStringMap::value_type("GM", tr("Gambia"))); + countryStringMap.insert(CountryStringMap::value_type("GE", tr("Georgia"))); + countryStringMap.insert(CountryStringMap::value_type("DE", tr("Germany"))); + countryStringMap.insert(CountryStringMap::value_type("GH", tr("Ghana"))); + countryStringMap.insert(CountryStringMap::value_type("GI", tr("Gibraltar"))); + countryStringMap.insert(CountryStringMap::value_type("GR", tr("Greece"))); + countryStringMap.insert(CountryStringMap::value_type("GL", tr("Greenland"))); + countryStringMap.insert(CountryStringMap::value_type("GD", tr("Grenada"))); + countryStringMap.insert(CountryStringMap::value_type("GP", tr("Guadeloupe"))); + countryStringMap.insert(CountryStringMap::value_type("GU", tr("Guam"))); + countryStringMap.insert(CountryStringMap::value_type("GT", tr("Guatemala"))); + countryStringMap.insert(CountryStringMap::value_type("GG", tr("Guernsey"))); + countryStringMap.insert(CountryStringMap::value_type("GN", tr("Guinea"))); + countryStringMap.insert(CountryStringMap::value_type("GW", tr("Guinea-Bissau"))); + countryStringMap.insert(CountryStringMap::value_type("GY", tr("Guyana"))); + countryStringMap.insert(CountryStringMap::value_type("HT", tr("Haiti"))); + countryStringMap.insert(CountryStringMap::value_type("HM", tr("Heard Island And Mcdonald Islands"))); + countryStringMap.insert(CountryStringMap::value_type("VA", tr("Holy See (Vatican City State)"))); + countryStringMap.insert(CountryStringMap::value_type("HN", tr("Honduras"))); + countryStringMap.insert(CountryStringMap::value_type("HK", tr("Hong Kong"))); + countryStringMap.insert(CountryStringMap::value_type("HU", tr("Hungary"))); + countryStringMap.insert(CountryStringMap::value_type("IS", tr("Iceland"))); + countryStringMap.insert(CountryStringMap::value_type("IN", tr("India"))); + countryStringMap.insert(CountryStringMap::value_type("ID", tr("Indonesia"))); + countryStringMap.insert(CountryStringMap::value_type("IR", tr("Iran, Islamic Republic Of"))); + countryStringMap.insert(CountryStringMap::value_type("IQ", tr("Iraq"))); + countryStringMap.insert(CountryStringMap::value_type("IE", tr("Ireland"))); + countryStringMap.insert(CountryStringMap::value_type("IM", tr("Isle Of Man"))); + countryStringMap.insert(CountryStringMap::value_type("IL", tr("Israel"))); + countryStringMap.insert(CountryStringMap::value_type("IT", tr("Italy"))); + countryStringMap.insert(CountryStringMap::value_type("JM", tr("Jamaica"))); + countryStringMap.insert(CountryStringMap::value_type("JP", tr("Japan"))); + countryStringMap.insert(CountryStringMap::value_type("JE", tr("Jersey"))); + countryStringMap.insert(CountryStringMap::value_type("JO", tr("Jordan"))); + countryStringMap.insert(CountryStringMap::value_type("KZ", tr("Kazakhstan"))); + countryStringMap.insert(CountryStringMap::value_type("KE", tr("Kenya"))); + countryStringMap.insert(CountryStringMap::value_type("KI", tr("Kiribati"))); + countryStringMap.insert(CountryStringMap::value_type("KP", tr("Korea, Democratic People'S Republic Of"))); + countryStringMap.insert(CountryStringMap::value_type("KR", tr("Korea, Republic Of"))); + countryStringMap.insert(CountryStringMap::value_type("KW", tr("Kuwait"))); + countryStringMap.insert(CountryStringMap::value_type("KG", tr("Kyrgyzstan"))); + countryStringMap.insert(CountryStringMap::value_type("LA", tr("Lao People'S Democratic Republic"))); + countryStringMap.insert(CountryStringMap::value_type("LV", tr("Latvia"))); + countryStringMap.insert(CountryStringMap::value_type("LB", tr("Lebanon"))); + countryStringMap.insert(CountryStringMap::value_type("LS", tr("Lesotho"))); + countryStringMap.insert(CountryStringMap::value_type("LR", tr("Liberia"))); + countryStringMap.insert(CountryStringMap::value_type("LY", tr("Libyan Arab Jamahiriya"))); + countryStringMap.insert(CountryStringMap::value_type("LI", tr("Liechtenstein"))); + countryStringMap.insert(CountryStringMap::value_type("LT", tr("Lithuania"))); + countryStringMap.insert(CountryStringMap::value_type("LU", tr("Luxembourg"))); + countryStringMap.insert(CountryStringMap::value_type("MO", tr("Macao"))); + countryStringMap.insert(CountryStringMap::value_type("MK", tr("Macedonia, The Former Yugoslav Republic Of"))); + countryStringMap.insert(CountryStringMap::value_type("MG", tr("Madagascar"))); + countryStringMap.insert(CountryStringMap::value_type("MW", tr("Malawi"))); + countryStringMap.insert(CountryStringMap::value_type("MY", tr("Malaysia"))); + countryStringMap.insert(CountryStringMap::value_type("MV", tr("Maldives"))); + countryStringMap.insert(CountryStringMap::value_type("ML", tr("Mali"))); + countryStringMap.insert(CountryStringMap::value_type("MT", tr("Malta"))); + countryStringMap.insert(CountryStringMap::value_type("MH", tr("Marshall Islands"))); + countryStringMap.insert(CountryStringMap::value_type("MQ", tr("Martinique"))); + countryStringMap.insert(CountryStringMap::value_type("MR", tr("Mauritania"))); + countryStringMap.insert(CountryStringMap::value_type("MU", tr("Mauritius"))); + countryStringMap.insert(CountryStringMap::value_type("YT", tr("Mayotte"))); + countryStringMap.insert(CountryStringMap::value_type("MX", tr("Mexico"))); + countryStringMap.insert(CountryStringMap::value_type("FM", tr("Micronesia, Federated States Of"))); + countryStringMap.insert(CountryStringMap::value_type("MD", tr("Moldova, Republic Of"))); + countryStringMap.insert(CountryStringMap::value_type("MC", tr("Monaco"))); + countryStringMap.insert(CountryStringMap::value_type("MN", tr("Mongolia"))); + countryStringMap.insert(CountryStringMap::value_type("MS", tr("Montserrat"))); + countryStringMap.insert(CountryStringMap::value_type("MA", tr("Morocco"))); + countryStringMap.insert(CountryStringMap::value_type("MZ", tr("Mozambique"))); + countryStringMap.insert(CountryStringMap::value_type("MM", tr("Myanmar"))); + countryStringMap.insert(CountryStringMap::value_type("NA", tr("Namibia"))); + countryStringMap.insert(CountryStringMap::value_type("NR", tr("Nauru"))); + countryStringMap.insert(CountryStringMap::value_type("NP", tr("Nepal"))); + countryStringMap.insert(CountryStringMap::value_type("NL", tr("Netherlands"))); + countryStringMap.insert(CountryStringMap::value_type("AN", tr("Netherlands Antilles"))); + countryStringMap.insert(CountryStringMap::value_type("NC", tr("New Caledonia"))); + countryStringMap.insert(CountryStringMap::value_type("NZ", tr("New Zealand"))); + countryStringMap.insert(CountryStringMap::value_type("NI", tr("Nicaragua"))); + countryStringMap.insert(CountryStringMap::value_type("NE", tr("Niger"))); + countryStringMap.insert(CountryStringMap::value_type("NG", tr("Nigeria"))); + countryStringMap.insert(CountryStringMap::value_type("NU", tr("Niue"))); + countryStringMap.insert(CountryStringMap::value_type("NF", tr("Norfolk Island"))); + countryStringMap.insert(CountryStringMap::value_type("MP", tr("Northern Mariana Islands"))); + countryStringMap.insert(CountryStringMap::value_type("NO", tr("Norway"))); + countryStringMap.insert(CountryStringMap::value_type("OM", tr("Oman"))); + countryStringMap.insert(CountryStringMap::value_type("PK", tr("Pakistan"))); + countryStringMap.insert(CountryStringMap::value_type("PW", tr("Palau"))); + countryStringMap.insert(CountryStringMap::value_type("PS", tr("Palestinian Territory, Occupied"))); + countryStringMap.insert(CountryStringMap::value_type("PA", tr("Panama"))); + countryStringMap.insert(CountryStringMap::value_type("PG", tr("Papua New Guinea"))); + countryStringMap.insert(CountryStringMap::value_type("PY", tr("Paraguay"))); + countryStringMap.insert(CountryStringMap::value_type("PE", tr("Peru"))); + countryStringMap.insert(CountryStringMap::value_type("PH", tr("Philippines"))); + countryStringMap.insert(CountryStringMap::value_type("PN", tr("Pitcairn"))); + countryStringMap.insert(CountryStringMap::value_type("PL", tr("Poland"))); + countryStringMap.insert(CountryStringMap::value_type("PT", tr("Portugal"))); + countryStringMap.insert(CountryStringMap::value_type("PR", tr("Puerto Rico"))); + countryStringMap.insert(CountryStringMap::value_type("QA", tr("Qatar"))); + countryStringMap.insert(CountryStringMap::value_type("RE", tr("Reunion"))); + countryStringMap.insert(CountryStringMap::value_type("RO", tr("Romania"))); + countryStringMap.insert(CountryStringMap::value_type("RU", tr("Russian Federation"))); + countryStringMap.insert(CountryStringMap::value_type("RW", tr("Rwanda"))); + countryStringMap.insert(CountryStringMap::value_type("SH", tr("Saint Helena"))); + countryStringMap.insert(CountryStringMap::value_type("KN", tr("Saint Kitts And Nevis"))); + countryStringMap.insert(CountryStringMap::value_type("LC", tr("Saint Lucia"))); + countryStringMap.insert(CountryStringMap::value_type("PM", tr("Saint Pierre And Miquelon"))); + countryStringMap.insert(CountryStringMap::value_type("VC", tr("Saint Vincent And The Grenadines"))); + countryStringMap.insert(CountryStringMap::value_type("WS", tr("Samoa"))); + countryStringMap.insert(CountryStringMap::value_type("SM", tr("San Marino"))); + countryStringMap.insert(CountryStringMap::value_type("ST", tr("Sao Tome And Principe"))); + countryStringMap.insert(CountryStringMap::value_type("SA", tr("Saudi Arabia"))); + countryStringMap.insert(CountryStringMap::value_type("SN", tr("Senegal"))); + countryStringMap.insert(CountryStringMap::value_type("CS", tr("Serbia And Montenegro"))); + countryStringMap.insert(CountryStringMap::value_type("SC", tr("Seychelles"))); + countryStringMap.insert(CountryStringMap::value_type("SL", tr("Sierra Leone"))); + countryStringMap.insert(CountryStringMap::value_type("SG", tr("Singapore"))); + countryStringMap.insert(CountryStringMap::value_type("SK", tr("Slovakia"))); + countryStringMap.insert(CountryStringMap::value_type("SI", tr("Slovenia"))); + countryStringMap.insert(CountryStringMap::value_type("SB", tr("Solomon Islands"))); + countryStringMap.insert(CountryStringMap::value_type("SO", tr("Somalia"))); + countryStringMap.insert(CountryStringMap::value_type("ZA", tr("South Africa"))); + countryStringMap.insert(CountryStringMap::value_type("GS", tr("South Georgia And The South Sandwich Islands"))); + countryStringMap.insert(CountryStringMap::value_type("ES", tr("Spain"))); + countryStringMap.insert(CountryStringMap::value_type("LK", tr("Sri Lanka"))); + countryStringMap.insert(CountryStringMap::value_type("SD", tr("Sudan"))); + countryStringMap.insert(CountryStringMap::value_type("SR", tr("Suriname"))); + countryStringMap.insert(CountryStringMap::value_type("SJ", tr("Svalbard And Jan Mayen"))); + countryStringMap.insert(CountryStringMap::value_type("SZ", tr("Swaziland"))); + countryStringMap.insert(CountryStringMap::value_type("SE", tr("Sweden"))); + countryStringMap.insert(CountryStringMap::value_type("CH", tr("Switzerland"))); + countryStringMap.insert(CountryStringMap::value_type("SY", tr("Syrian Arab Republic"))); + countryStringMap.insert(CountryStringMap::value_type("TW", tr("Taiwan, Province Of China"))); + countryStringMap.insert(CountryStringMap::value_type("TJ", tr("Tajikistan"))); + countryStringMap.insert(CountryStringMap::value_type("TZ", tr("Tanzania, United Republic Of"))); + countryStringMap.insert(CountryStringMap::value_type("TH", tr("Thailand"))); + countryStringMap.insert(CountryStringMap::value_type("TL", tr("Timor-Leste"))); + countryStringMap.insert(CountryStringMap::value_type("TG", tr("Togo"))); + countryStringMap.insert(CountryStringMap::value_type("TK", tr("Tokelau"))); + countryStringMap.insert(CountryStringMap::value_type("TO", tr("Tonga"))); + countryStringMap.insert(CountryStringMap::value_type("TT", tr("Trinidad And Tobago"))); + countryStringMap.insert(CountryStringMap::value_type("TN", tr("Tunisia"))); + countryStringMap.insert(CountryStringMap::value_type("TR", tr("Turkey"))); + countryStringMap.insert(CountryStringMap::value_type("TM", tr("Turkmenistan"))); + countryStringMap.insert(CountryStringMap::value_type("TC", tr("Turks And Caicos Islands"))); + countryStringMap.insert(CountryStringMap::value_type("TV", tr("Tuvalu"))); + countryStringMap.insert(CountryStringMap::value_type("UG", tr("Uganda"))); + countryStringMap.insert(CountryStringMap::value_type("UA", tr("Ukraine"))); + countryStringMap.insert(CountryStringMap::value_type("AE", tr("United Arab Emirates"))); + countryStringMap.insert(CountryStringMap::value_type("GB", tr("United Kingdom"))); + countryStringMap.insert(CountryStringMap::value_type("US", tr("United States"))); + countryStringMap.insert(CountryStringMap::value_type("UM", tr("United States Minor Outlying Islands"))); + countryStringMap.insert(CountryStringMap::value_type("UY", tr("Uruguay"))); + countryStringMap.insert(CountryStringMap::value_type("UZ", tr("Uzbekistan"))); + countryStringMap.insert(CountryStringMap::value_type("VU", tr("Vanuatu"))); + countryStringMap.insert(CountryStringMap::value_type("VE", tr("Venezuela"))); + countryStringMap.insert(CountryStringMap::value_type("VN", tr("Viet Nam"))); + countryStringMap.insert(CountryStringMap::value_type("VG", tr("Virgin Islands, British"))); + countryStringMap.insert(CountryStringMap::value_type("VI", tr("Virgin Islands, U.S."))); + countryStringMap.insert(CountryStringMap::value_type("WF", tr("Wallis And Futuna"))); + countryStringMap.insert(CountryStringMap::value_type("EH", tr("Western Sahara"))); + countryStringMap.insert(CountryStringMap::value_type("YE", tr("Yemen"))); + countryStringMap.insert(CountryStringMap::value_type("ZM", tr("Zambia"))); + countryStringMap.insert(CountryStringMap::value_type("ZW", tr("Zimbabwe"))); } QString fullString(""); diff --git a/src/net/chatcleanermanager.h b/src/net/chatcleanermanager.h index a382ff59..9eba40d4 100644 --- a/src/net/chatcleanermanager.h +++ b/src/net/chatcleanermanager.h @@ -67,7 +67,7 @@ private: std::string m_clientSecret; std::string m_serverSecret; unsigned char m_recvBuf[2*MAX_CLEANER_PACKET_SIZE]; - unsigned m_recvBufUsed; + size_t m_recvBufUsed; }; #endif diff --git a/src/net/common/chatcleanermanager.cpp b/src/net/common/chatcleanermanager.cpp index 33b7b4bb..0fb749e7 100644 --- a/src/net/common/chatcleanermanager.cpp +++ b/src/net/common/chatcleanermanager.cpp @@ -99,10 +99,10 @@ ChatCleanerManager::HandleGameChatText(unsigned gameId, unsigned playerId, const netRequest->playerId = playerId; OCTET_STRING_fromBuf(&netRequest->playerName, name.c_str(), - name.length()); + (int)name.length()); OCTET_STRING_fromBuf(&netRequest->chatMessage, text.c_str(), - text.length()); + (int)text.length()); SendMessageToServer(tmpChat); } } @@ -135,7 +135,7 @@ ChatCleanerManager::HandleConnect(const boost::system::error_code& ec, netInit->requestedVersion = CLEANER_PROTOCOL_VERSION; OCTET_STRING_fromBuf(&netInit->clientSecret, m_clientSecret.c_str(), - m_clientSecret.length()); + (int)m_clientSecret.length()); SendMessageToServer(tmpInit); m_socket->async_read_some( boost::asio::buffer(m_recvBuf, sizeof(m_recvBuf)), diff --git a/src/net/common/clientstate.cpp b/src/net/common/clientstate.cpp index 2f09dbcb..aa073442 100644 --- a/src/net/common/clientstate.cpp +++ b/src/net/common/clientstate.cpp @@ -920,7 +920,7 @@ ClientStateStartSession::InternalHandlePacket(boost::shared_ptr cl UnauthenticatedLogin_t *noauthLogin = &netInit->login.choice.unauthenticatedLogin; OCTET_STRING_fromBuf(&noauthLogin->nickName, context.GetPlayerName().c_str(), - context.GetPlayerName().length()); + (int)context.GetPlayerName().length()); string avatarFile = client->GetQtToolsInterface().stringFromUtf8(context.GetAvatarFile()); if (!avatarFile.empty()) { MD5Buf tmpMD5; @@ -995,7 +995,7 @@ ClientStateWaitEnterLogin::TimerLoop(const boost::system::error_code& ec, boost: GuestLogin_t *guestLogin = &netInit->login.choice.guestLogin; OCTET_STRING_fromBuf(&guestLogin->nickName, context.GetPlayerName().c_str(), - context.GetPlayerName().length()); + (int)context.GetPlayerName().length()); client->GetSender().Send(context.GetSessionData(), init); client->SetState(ClientStateWaitSession::Instance()); @@ -1013,7 +1013,7 @@ ClientStateWaitEnterLogin::TimerLoop(const boost::system::error_code& ec, boost: string outUserData(tmpSession->AuthGetNextOutMsg()); OCTET_STRING_fromBuf(&authLogin->clientUserData, outUserData.c_str(), - outUserData.length()); + (int)outUserData.length()); string avatarFile = client->GetQtToolsInterface().stringFromUtf8(context.GetAvatarFile()); if (!avatarFile.empty()) { MD5Buf tmpMD5; @@ -1089,7 +1089,7 @@ ClientStateWaitAuthChallenge::InternalHandlePacket(boost::shared_ptrclientResponse, outUserData.c_str(), - outUserData.length()); + (int)outUserData.length()); client->GetSender().Send(tmpSession, packet); client->SetState(ClientStateWaitAuthVerify::Instance()); } else diff --git a/src/net/common/clientthread.cpp b/src/net/common/clientthread.cpp index 08e1ba44..eeacd0ba 100644 --- a/src/net/common/clientthread.cpp +++ b/src/net/common/clientthread.cpp @@ -162,7 +162,7 @@ ClientThread::SendGameChatMessage(const std::string &msg) ChatRequestMessage_t *netChat = &packet->GetMsg()->choice.chatRequestMessage; OCTET_STRING_fromBuf(&netChat->chatText, msg.c_str(), - msg.length()); + (int)msg.length()); netChat->chatRequestType.present = chatRequestType_PR_chatRequestTypeGame; netChat->chatRequestType.choice.chatRequestTypeGame.gameId = GetGameId(); @@ -181,7 +181,7 @@ ClientThread::SendLobbyChatMessage(const std::string &msg) ChatRequestMessage_t *netChat = &packet->GetMsg()->choice.chatRequestMessage; OCTET_STRING_fromBuf(&netChat->chatText, msg.c_str(), - msg.length()); + (int)msg.length()); netChat->chatRequestType.present = chatRequestType_PR_chatRequestTypeLobby; @@ -199,7 +199,7 @@ ClientThread::SendPrivateChatMessage(unsigned targetPlayerId, const std::string ChatRequestMessage_t *netChat = &packet->GetMsg()->choice.chatRequestMessage; OCTET_STRING_fromBuf(&netChat->chatText, msg.c_str(), - msg.length()); + (int)msg.length()); netChat->chatRequestType.present = chatRequestType_PR_chatRequestTypePrivate; netChat->chatRequestType.choice.chatRequestTypePrivate.targetPlayerId = targetPlayerId; @@ -221,7 +221,7 @@ ClientThread::SendJoinFirstGame(const std::string &password, bool autoLeave) netJoinGame->password = OCTET_STRING_new_fromBuf( &asn_DEF_UTF8String, password.c_str(), - password.length()); + (int)password.length()); } netJoinGame->joinGameAction.present = joinGameAction_PR_joinExistingGame; @@ -243,7 +243,7 @@ ClientThread::SendJoinGame(unsigned gameId, const std::string &password, bool au netJoinGame->password = OCTET_STRING_new_fromBuf( &asn_DEF_UTF8String, password.c_str(), - password.length()); + (int)password.length()); } netJoinGame->joinGameAction.present = joinGameAction_PR_joinExistingGame; @@ -265,7 +265,7 @@ ClientThread::SendCreateGame(const GameData &gameData, const std::string &name, netJoinGame->password = OCTET_STRING_new_fromBuf( &asn_DEF_UTF8String, password.c_str(), - password.length()); + (int)password.length()); } netJoinGame->joinGameAction.present = joinGameAction_PR_joinNewGame; @@ -273,7 +273,7 @@ ClientThread::SendCreateGame(const GameData &gameData, const std::string &name, NetPacket::SetGameData(gameData, &joinNew->gameInfo); OCTET_STRING_fromBuf(&joinNew->gameInfo.gameName, name.c_str(), - name.length()); + (int)name.length()); m_ioService->post(boost::bind(&ClientThread::SendSessionPacket, shared_from_this(), packet)); } diff --git a/src/net/common/downloadhelper.cpp b/src/net/common/downloadhelper.cpp index 5e8eb10f..128878a0 100644 --- a/src/net/common/downloadhelper.cpp +++ b/src/net/common/downloadhelper.cpp @@ -37,7 +37,7 @@ DownloadHelper::~DownloadHelper() } void -DownloadHelper::InternalInit(const string &/*url*/, const string &targetFileName, const string &/*user*/, const string &/*password*/, int /*filesize*/) +DownloadHelper::InternalInit(const string &/*url*/, const string &targetFileName, const string &/*user*/, const string &/*password*/, size_t /*filesize*/) { // Open target file for writing. GetData()->targetFile = fopen(targetFileName.c_str(), "wb"); diff --git a/src/net/common/ircthread.cpp b/src/net/common/ircthread.cpp index cd00ddd7..7cf4274f 100644 --- a/src/net/common/ircthread.cpp +++ b/src/net/common/ircthread.cpp @@ -51,7 +51,7 @@ struct IrcContext { string channelPassword; unsigned renameTries; bool sendingBlocked; - unsigned sendCounter; + size_t sendCounter; queue sendQueue; }; diff --git a/src/net/common/netpacket.cpp b/src/net/common/netpacket.cpp index 33a06234..575b71c5 100644 --- a/src/net/common/netpacket.cpp +++ b/src/net/common/netpacket.cpp @@ -35,7 +35,7 @@ NetPacket::~NetPacket() } boost::shared_ptr -NetPacket::Create(char *data, unsigned &dataSize) +NetPacket::Create(char *data, size_t &dataSize) { boost::shared_ptr tmpPacket; diff --git a/src/net/common/servergame.cpp b/src/net/common/servergame.cpp index 7af0134b..0517e719 100644 --- a/src/net/common/servergame.cpp +++ b/src/net/common/servergame.cpp @@ -238,7 +238,7 @@ ServerGame::InternalStartGame() // Set start data. StartData startData; - startData.numberOfPlayers = playerData.size(); + startData.numberOfPlayers = (int)playerData.size(); int tmpDealerPos = 0; Tools::getRandNumber(0, startData.numberOfPlayers-1, 1, &tmpDealerPos, 0); @@ -793,10 +793,10 @@ ServerGame::RemoveDisconnectedPlayers() } } -size_t +int ServerGame::GetCurNumberOfPlayers() const { - return GetFullPlayerDataList().size(); + return (int)GetFullPlayerDataList().size(); } void diff --git a/src/net/common/servergamestate.cpp b/src/net/common/servergamestate.cpp index e6825f0d..178c97a9 100644 --- a/src/net/common/servergamestate.cpp +++ b/src/net/common/servergamestate.cpp @@ -408,7 +408,7 @@ ServerGameStateInit::HandleNewSession(boost::shared_ptr server, boos if (session && session->GetPlayerData()) { const GameData &tmpGameData = server->GetGameData(); // Check the number of players. - if (server->GetCurNumberOfPlayers() >= (size_t)tmpGameData.maxNumberOfPlayers) { + if (server->GetCurNumberOfPlayers() >= tmpGameData.maxNumberOfPlayers) { server->MoveSessionToLobby(session, NTF_NET_REMOVED_GAME_FULL); } else { session->GetPlayerData()->SetGameAdmin(session->GetPlayerData()->GetUniqueId() == server->GetAdminPlayerId()); @@ -426,7 +426,7 @@ ServerGameStateInit::HandleNewSession(boost::shared_ptr server, boos OCTET_STRING_fromBuf( &joinAck->gameInfo.gameName, server->GetName().c_str(), - server->GetName().length()); + (int)server->GetName().length()); server->GetLobbyThread().GetSender().Send(session, packet); // Send notifications for connected players to client. @@ -447,7 +447,7 @@ ServerGameStateInit::HandleNewSession(boost::shared_ptr server, boos // Notify lobby. server->GetLobbyThread().NotifyPlayerJoinedGame(server->GetId(), session->GetPlayerData()->GetUniqueId()); - if (server->GetCurNumberOfPlayers() == (size_t)tmpGameData.maxNumberOfPlayers) { + if (server->GetCurNumberOfPlayers() == tmpGameData.maxNumberOfPlayers) { // Automatically start the game if it is full. RegisterAutoStartTimer(server); } @@ -582,7 +582,7 @@ ServerGameStateInit::InternalProcessPacket(boost::shared_ptr server, if (session->GetPlayerData()->IsGameAdmin() && netStartEvent->gameId == server->GetId() && (server->GetGameData().gameType != GAME_TYPE_RANKING // ranking games need to be full - || server->GetGameData().maxNumberOfPlayers == (int)server->GetCurNumberOfPlayers())) { + || server->GetGameData().maxNumberOfPlayers == server->GetCurNumberOfPlayers())) { SendStartEvent(*server, netStartEvent->fillWithComputerPlayers); } else { // kick players who try to start but are not allowed to server->MoveSessionToLobby(session, NTF_NET_REMOVED_START_FAILED); diff --git a/src/net/common/serverlobbythread.cpp b/src/net/common/serverlobbythread.cpp index 52eeb6dc..d76bc66e 100644 --- a/src/net/common/serverlobbythread.cpp +++ b/src/net/common/serverlobbythread.cpp @@ -561,7 +561,7 @@ ServerLobbyThread::SendGlobalChat(const string &message) OCTET_STRING_fromBuf( &netChat->chatText, message.c_str(), - message.length()); + (int)message.length()); m_sessionManager.SendToAllSessions(GetSender(), packet, SessionData::Established); m_gameSessionManager.SendToAllSessions(GetSender(), packet, SessionData::Game); @@ -577,7 +577,7 @@ ServerLobbyThread::SendGlobalMsgBox(const string &message) OCTET_STRING_fromBuf( &netDialog->notificationText, message.c_str(), - message.length()); + (int)message.length()); m_sessionManager.SendToAllSessions(GetSender(), packet, SessionData::Established); m_gameSessionManager.SendToAllSessions(GetSender(), packet, SessionData::Game); } @@ -592,7 +592,7 @@ ServerLobbyThread::SendChatBotMsg(const std::string &message) OCTET_STRING_fromBuf( &netChat->chatText, message.c_str(), - message.length()); + (int)message.length()); m_sessionManager.SendLobbyMsgToAllSessions(GetSender(), packet, SessionData::Established); m_gameSessionManager.SendLobbyMsgToAllSessions(GetSender(), packet, SessionData::Game); @@ -613,7 +613,7 @@ ServerLobbyThread::SendChatBotMsg(unsigned gameId, const std::string &message) OCTET_STRING_fromBuf( &netChat->chatText, message.c_str(), - message.length()); + (int)message.length()); GameMap::const_iterator pos = m_gameMap.find(gameId); if (pos != m_gameMap.end()) { @@ -1075,7 +1075,7 @@ ServerLobbyThread::HandleNetPacketAuthClientResponse(boost::shared_ptrserverVerification, (char *)outVerification.c_str(), - outVerification.size()); + (int)outVerification.size()); GetSender().Send(session, packet); // The last message is only for server verification. // We are done now, the user has logged in. @@ -1193,12 +1193,12 @@ ServerLobbyThread::HandleNetPacketRetrievePlayerInfo(boost::shared_ptrplayerName, tmpPlayer->GetName().c_str(), - tmpPlayer->GetName().length()); + (int)tmpPlayer->GetName().length()); if (!tmpPlayer->GetCountry().empty()) { data->countryCode = OCTET_STRING_new_fromBuf( &asn_DEF_UTF8String, tmpPlayer->GetCountry().c_str(), - tmpPlayer->GetCountry().length()); + (int)tmpPlayer->GetCountry().length()); } if (!tmpPlayer->GetAvatarMD5().IsZero()) { data->avatarData = (struct PlayerInfoData::avatarData *)calloc(1, sizeof(struct PlayerInfoData::avatarData)); @@ -1503,7 +1503,7 @@ ServerLobbyThread::EstablishSession(boost::shared_ptr session) OCTET_STRING_fromBuf( &netInitAck->yourSessionId, (char *)&sessionId, - boost::uuids::uuid::static_size()); + (int)boost::uuids::uuid::static_size()); netInitAck->yourPlayerId = session->GetPlayerData()->GetUniqueId(); GetSender().Send(session, ack); @@ -2124,7 +2124,7 @@ ServerLobbyThread::CreateNetPacketGameListNew(const ServerGame &game) OCTET_STRING_fromBuf( &gameNew->gameInfo.gameName, game.GetName().c_str(), - game.GetName().length()); + (int)game.GetName().length()); gameNew->isPrivate = game.IsPasswordProtected(); PlayerIdList tmpList = game.GetPlayerIdList(); diff --git a/src/net/common/sessionmanager.cpp b/src/net/common/sessionmanager.cpp index f43b13d9..e8db07f3 100644 --- a/src/net/common/sessionmanager.cpp +++ b/src/net/common/sessionmanager.cpp @@ -286,7 +286,7 @@ unsigned SessionManager::GetRawSessionCount() { boost::recursive_mutex::scoped_lock lock(m_sessionMapMutex); - return m_sessionMap.size(); + return (unsigned)m_sessionMap.size(); } unsigned diff --git a/src/net/common/transferhelper.cpp b/src/net/common/transferhelper.cpp index e04eee4b..a1584d4b 100644 --- a/src/net/common/transferhelper.cpp +++ b/src/net/common/transferhelper.cpp @@ -43,7 +43,7 @@ TransferHelper::~TransferHelper() } void -TransferHelper::Init(const string &url, const string &targetFileName, const string &user, const string &password, int filesize) +TransferHelper::Init(const string &url, const string &targetFileName, const string &user, const string &password, size_t filesize) { // Initialise curl. m_data->curlHandle = curl_easy_init(); diff --git a/src/net/common/uploaderthread.cpp b/src/net/common/uploaderthread.cpp index e4d6f54f..e67987bd 100644 --- a/src/net/common/uploaderthread.cpp +++ b/src/net/common/uploaderthread.cpp @@ -40,7 +40,7 @@ UploaderThread::~UploaderThread() } void -UploaderThread::QueueUpload(const string &url, const string &user, const string &pwd, const string &filename, int filesize) +UploaderThread::QueueUpload(const string &url, const string &user, const string &pwd, const string &filename, size_t filesize) { boost::mutex::scoped_lock lock(m_uploadQueueMutex); m_uploadQueue.push(UploadData(url, user, pwd, filename, filesize)); diff --git a/src/net/common/uploadhelper.cpp b/src/net/common/uploadhelper.cpp index def83a2f..34f3b105 100644 --- a/src/net/common/uploadhelper.cpp +++ b/src/net/common/uploadhelper.cpp @@ -44,7 +44,7 @@ UploadHelper::~UploadHelper() } void -UploadHelper::InternalInit(const string &/*url*/, const string &targetFileName, const string &user, const string &password, int filesize) +UploadHelper::InternalInit(const string &/*url*/, const string &targetFileName, const string &user, const string &password, size_t filesize) { // Open target file for reading. GetData()->targetFile = fopen(targetFileName.c_str(), "rb"); diff --git a/src/net/downloadhelper.h b/src/net/downloadhelper.h index dc7d9e3c..2b388bd3 100644 --- a/src/net/downloadhelper.h +++ b/src/net/downloadhelper.h @@ -32,7 +32,7 @@ public: protected: virtual void InternalInit(const std::string &url, const std::string &targetFileName, - const std::string &user, const std::string &password, int filesize); + const std::string &user, const std::string &password, size_t filesize); }; #endif diff --git a/src/net/netpacket.h b/src/net/netpacket.h index fc548eb3..f87f80d0 100644 --- a/src/net/netpacket.h +++ b/src/net/netpacket.h @@ -51,7 +51,7 @@ public: NetPacket(MemAllocType alloc = NoAlloc); ~NetPacket(); - static boost::shared_ptr Create(char *data, unsigned &dataSize); + static boost::shared_ptr Create(char *data, size_t &dataSize); const PokerTHMessage_t *GetMsg() const { return m_msg; diff --git a/src/net/receivebuffer.h b/src/net/receivebuffer.h index 9bcaccb0..2c600f5d 100644 --- a/src/net/receivebuffer.h +++ b/src/net/receivebuffer.h @@ -46,7 +46,7 @@ protected: private: NetPacketList receivedPackets; char recvBuf[RECV_BUF_SIZE]; - unsigned recvBufUsed; + size_t recvBufUsed; }; #endif diff --git a/src/net/sendbuffer.h b/src/net/sendbuffer.h index 75fed886..ded8fc21 100644 --- a/src/net/sendbuffer.h +++ b/src/net/sendbuffer.h @@ -38,7 +38,7 @@ public: ~SendBuffer(); inline size_t GetSendBufLeft() const { - int bytesLeft = sendBufAllocated - sendBufUsed; + int bytesLeft = (int)(sendBufAllocated - sendBufUsed); return bytesLeft < 0 ? (size_t)0 : (size_t)bytesLeft; } diff --git a/src/net/servergame.h b/src/net/servergame.h index 2e83af6b..e70c87fd 100644 --- a/src/net/servergame.h +++ b/src/net/servergame.h @@ -133,7 +133,7 @@ protected: void MoveSessionToLobby(boost::shared_ptr session, int reason); void RemoveDisconnectedPlayers(); - size_t GetCurNumberOfPlayers() const; + int GetCurNumberOfPlayers() const; void AssignPlayerNumbers(PlayerDataList &playerList); bool IsValidPlayer(unsigned playerId) const; diff --git a/src/net/transferhelper.h b/src/net/transferhelper.h index 180ecf34..c9430cb0 100644 --- a/src/net/transferhelper.h +++ b/src/net/transferhelper.h @@ -36,7 +36,7 @@ public: // Set the parameters. Does not do any error checking. // Throws an exception on failure. void Init(const std::string &url, const std::string &targetFileName, - const std::string &user = "", const std::string &password = "", int filesize = 0); + const std::string &user = "", const std::string &password = "", size_t filesize = 0); // Returns true when done, false should call again. // Throws an exception on error. @@ -49,7 +49,7 @@ protected: boost::shared_ptr GetData(); virtual void InternalInit(const std::string &url, const std::string &targetFileName, - const std::string &user, const std::string &password, int filesize) = 0; + const std::string &user, const std::string &password, size_t filesize) = 0; private: diff --git a/src/net/uploaderthread.h b/src/net/uploaderthread.h index 5141cdba..f883305e 100644 --- a/src/net/uploaderthread.h +++ b/src/net/uploaderthread.h @@ -36,19 +36,19 @@ public: UploaderThread(); virtual ~UploaderThread(); - void QueueUpload(const std::string &url, const std::string &user, const std::string &pwd, const std::string &filename, int filesize); + void QueueUpload(const std::string &url, const std::string &user, const std::string &pwd, const std::string &filename, size_t filesize); protected: struct UploadData { UploadData() : filesize(0) {} - UploadData(const std::string &a, const std::string &u, const std::string &p, const std::string &f, int s) + UploadData(const std::string &a, const std::string &u, const std::string &p, const std::string &f, size_t s) : address(a), user(u), pwd(p), filename(f), filesize(s) {} std::string address; std::string user; std::string pwd; std::string filename; - int filesize; + size_t filesize; }; typedef std::queue UploadDataQueue; diff --git a/src/net/uploadhelper.h b/src/net/uploadhelper.h index b0148291..2a578c8d 100644 --- a/src/net/uploadhelper.h +++ b/src/net/uploadhelper.h @@ -32,7 +32,7 @@ public: protected: virtual void InternalInit(const std::string &url, const std::string &targetFileName, - const std::string &user, const std::string &password, int filesize); + const std::string &user, const std::string &password, size_t filesize); }; #endif diff --git a/src/playerdata.h b/src/playerdata.h index e172c9a7..9bf551f0 100644 --- a/src/playerdata.h +++ b/src/playerdata.h @@ -54,7 +54,7 @@ struct AvatarFile { AvatarFile() : fileType(AVATAR_FILE_TYPE_UNKNOWN), reportedSize(0) {} std::vector fileData; AvatarFileType fileType; - unsigned reportedSize; + size_t reportedSize; }; struct PlayerInfo { diff --git a/src/pokerth_server.cpp b/src/pokerth_server.cpp index 25cc6422..e7c52432 100644 --- a/src/pokerth_server.cpp +++ b/src/pokerth_server.cpp @@ -149,7 +149,7 @@ main(int argc, char *argv[]) { ofstream pidStream(pidFile.c_str(), ios_base::out | ios_base::trunc); if (!pidStream.fail()) - pidStream << getpid(); + pidStream << _getpid(); else LOG_ERROR("Could not create process id file \"" << pidFile << "\"!"); }