Skip to content

Commit

Permalink
lang_instance: minor int/uint fix to avoid warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
leha-bot committed Jul 24, 2019
1 parent 42e3710 commit 05ce42e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Telegram/SourceFiles/lang/lang_instance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ void Instance::fillFromSerialized(const QByteArray &data) {
qint32 version = 0;
QString customFilePathAbsolute, customFilePathRelative;
QByteArray customFileContent;
qint32 nonDefaultValuesCount = 0;
quint32 nonDefaultValuesCount = 0;
stream >> id >> version;
stream >> customFilePathAbsolute >> customFilePathRelative >> customFileContent;
stream >> nonDefaultValuesCount;
Expand All @@ -297,7 +297,7 @@ void Instance::fillFromSerialized(const QByteArray &data) {

std::vector<QByteArray> nonDefaultStrings;
nonDefaultStrings.reserve(2 * nonDefaultValuesCount);
for (auto i = 0; i != nonDefaultValuesCount; ++i) {
for (size_t i = 0; i != nonDefaultValuesCount; ++i) {
QByteArray key, value;
stream >> key >> value;
if (stream.status() != QDataStream::Ok) {
Expand All @@ -315,7 +315,7 @@ void Instance::fillFromSerialized(const QByteArray &data) {
_customFilePathRelative = customFilePathRelative;
_customFileContent = customFileContent;
LOG(("Lang Info: Loaded cached, keys: %1").arg(nonDefaultValuesCount));
for (auto i = 0, count = nonDefaultValuesCount * 2; i != count; i += 2) {
for (size_t i = 0, count = nonDefaultValuesCount * 2; i != count; i += 2) {
applyValue(nonDefaultStrings[i], nonDefaultStrings[i + 1]);
}
updatePluralRules();
Expand Down

0 comments on commit 05ce42e

Please sign in to comment.