Alpha 1.0.21: Fix more compilation bugs.

This commit is contained in:
John Preston 2017-03-11 17:13:57 +03:00
parent 28ae5fd65c
commit f2cd364e14
3 changed files with 20 additions and 2 deletions

View file

@ -53,6 +53,24 @@ inline void t_assert_fail(const char *message, const char *file, int32 line) {
#define Ensures(condition) t_assert_full(condition, "\"" #condition "\"", __FILE__, __LINE__)
#endif // Ensures
// Define specializations for QByteArray for Qt 5.3.2, because
// QByteArray in Qt 5.3.2 doesn't declare "pointer" subtype.
#ifdef OS_MAC_OLD
namespace gsl {
template <>
inline span<char> make_span<QByteArray>(QByteArray &cont) {
return span<char>(cont.data(), cont.size());
}
template <>
inline span<const char> make_span(const QByteArray &cont) {
return span<const char>(cont.constData(), cont.size());
}
} // namespace gsl
#endif // OS_MAC_OLD
namespace base {
template <typename T, size_t N>

View file

@ -2072,7 +2072,7 @@ mtpBuffer ConnectionPrivate::ungzip(const mtpPrime *from, const mtpPrime *end) c
if (res != Z_OK && res != Z_STREAM_END) {
inflateEnd(&stream);
LOG(("RPC Error: could not unpack gziped data, code: %1").arg(res));
DEBUG_LOG(("RPC Error: bad gzip: %1").arg(Logs::mb(&packed.v[0], packedLen).str()));
DEBUG_LOG(("RPC Error: bad gzip: %1").arg(Logs::mb(packed.v.constData(), packedLen).str()));
return mtpBuffer();
}
}

View file

@ -72,7 +72,7 @@ void DcOptions::processFromList(const QVector<MTPDcOption> &options, bool overwr
}
shiftedIdsProcessed.push_back(dcIdWithShift);
auto &ip = std::string(option.vip_address.v.constData(), option.vip_address.v.size());
auto ip = std::string(option.vip_address.v.constData(), option.vip_address.v.size());
auto port = option.vport.v;
if (applyOneGuarded(dcId, flags, ip, port)) {
if (!base::contains(idsChanged, dcId)) {