Version 1.1.16: Fix build for Qt 5.3.2 and GCC.

This commit is contained in:
John Preston 2017-07-26 19:10:04 +03:00
parent fdcb28f1a0
commit dfa7cb1826
2 changed files with 5 additions and 5 deletions

View File

@ -308,21 +308,21 @@ Replaces PrepareReplaces(const QString &filename) {
} }
auto list = document.object(); auto list = document.object();
for (auto i = list.constBegin(), e = list.constEnd(); i != e; ++i) { for (auto i = list.constBegin(), e = list.constEnd(); i != e; ++i) {
if (!i->isObject()) { if (!(*i).isObject()) {
logReplacesError(filename) << "Child object not found."; logReplacesError(filename) << "Child object not found.";
return Replaces(filename); return Replaces(filename);
} }
auto childKey = i.key(); auto childKey = i.key();
auto child = i->toObject(); auto child = (*i).toObject();
auto failed = false; auto failed = false;
auto getString = [filename, childKey, &child, &failed](const QString &key) { auto getString = [filename, childKey, &child, &failed](const QString &key) {
auto it = child.constFind(key); auto it = child.constFind(key);
if (it == child.constEnd() || !it->isString()) { if (it == child.constEnd() || !(*it).isString()) {
logReplacesError(filename) << "Child '" << childKey.toStdString() << "' field not found: " << key.toStdString(); logReplacesError(filename) << "Child '" << childKey.toStdString() << "' field not found: " << key.toStdString();
failed = true; failed = true;
return QString(); return QString();
} }
return it->toString(); return (*it).toString();
}; };
auto idParts = getString("output").split('-'); auto idParts = getString("output").split('-');
auto name = getString("name"); auto name = getString("name");

View File

@ -170,7 +170,7 @@ private:
private: private:
std::vector<small> &_map; std::vector<small> &_map;
int _index = 0; int _index = 0;
bool _guarded = false; small _guarded = 0;
}; };
std::vector<small> _currentItemWordsUsedMap; std::vector<small> _currentItemWordsUsedMap;