mirror of
https://github.com/vale981/tdesktop
synced 2025-03-06 02:01:40 -05:00
Closed beta 1001007003: Fix build for old OS X.
This commit is contained in:
parent
c3db57a4fc
commit
67f2daa43c
2 changed files with 9 additions and 6 deletions
|
@ -59,7 +59,9 @@ private:
|
|||
|
||||
bool _failed = true;
|
||||
|
||||
const char *_begin, *_ch, *_end;
|
||||
const char *_begin = nullptr;
|
||||
const char *_ch = nullptr;
|
||||
const char *_end = nullptr;
|
||||
|
||||
QString _result;
|
||||
OrderedSet<ushort> _tagsUsed;
|
||||
|
@ -69,6 +71,7 @@ private:
|
|||
ValueParser::ValueParser(const QByteArray &key, LangKey keyIndex, const QByteArray &value)
|
||||
: _key(key)
|
||||
, _keyIndex(keyIndex)
|
||||
, _currentTag("")
|
||||
, _begin(value.constData())
|
||||
, _ch(_begin)
|
||||
, _end(_begin + value.size()) {
|
||||
|
@ -146,7 +149,7 @@ bool ValueParser::parse() {
|
|||
_result.append(_currentTagReplacer);
|
||||
|
||||
_begin = _ch + 1;
|
||||
_currentTag = QLatin1String();
|
||||
_currentTag = QLatin1String("");
|
||||
}
|
||||
}
|
||||
appendToResult(_end);
|
||||
|
|
|
@ -104,10 +104,10 @@ void SpecialConfigRequest::dnsFinished() {
|
|||
auto answerIt = response.find(qsl("Answer"));
|
||||
if (answerIt == response.constEnd()) {
|
||||
LOG(("Config Error: Could not find Answer in dns response JSON."));
|
||||
} else if (!answerIt->isArray()) {
|
||||
} else if (!(*answerIt).isArray()) {
|
||||
LOG(("Config Error: Not an array received in Answer in dns response JSON."));
|
||||
} else {
|
||||
for (auto elem : answerIt->toArray()) {
|
||||
for (auto elem : (*answerIt).toArray()) {
|
||||
if (!elem.isObject()) {
|
||||
LOG(("Config Error: Not an object found in Answer array in dns response JSON."));
|
||||
} else {
|
||||
|
@ -115,10 +115,10 @@ void SpecialConfigRequest::dnsFinished() {
|
|||
auto dataIt = object.find(qsl("data"));
|
||||
if (dataIt == object.constEnd()) {
|
||||
LOG(("Config Error: Could not find data in Answer array entry in dns response JSON."));
|
||||
} else if (!dataIt->isString()) {
|
||||
} else if (!(*dataIt).isString()) {
|
||||
LOG(("Config Error: Not a string data found in Answer array entry in dns response JSON."));
|
||||
} else {
|
||||
auto data = dataIt->toString();
|
||||
auto data = (*dataIt).toString();
|
||||
entries.insertMulti(INT_MAX - data.size(), data);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue