mirror of https://github.com/procxx/kepka.git
Alpha 1.0.21: Fix more compilation bugs.
This commit is contained in:
parent
28ae5fd65c
commit
f2cd364e14
|
@ -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__)
|
#define Ensures(condition) t_assert_full(condition, "\"" #condition "\"", __FILE__, __LINE__)
|
||||||
#endif // Ensures
|
#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 {
|
namespace base {
|
||||||
|
|
||||||
template <typename T, size_t N>
|
template <typename T, size_t N>
|
||||||
|
|
|
@ -2072,7 +2072,7 @@ mtpBuffer ConnectionPrivate::ungzip(const mtpPrime *from, const mtpPrime *end) c
|
||||||
if (res != Z_OK && res != Z_STREAM_END) {
|
if (res != Z_OK && res != Z_STREAM_END) {
|
||||||
inflateEnd(&stream);
|
inflateEnd(&stream);
|
||||||
LOG(("RPC Error: could not unpack gziped data, code: %1").arg(res));
|
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();
|
return mtpBuffer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,7 @@ void DcOptions::processFromList(const QVector<MTPDcOption> &options, bool overwr
|
||||||
}
|
}
|
||||||
|
|
||||||
shiftedIdsProcessed.push_back(dcIdWithShift);
|
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;
|
auto port = option.vport.v;
|
||||||
if (applyOneGuarded(dcId, flags, ip, port)) {
|
if (applyOneGuarded(dcId, flags, ip, port)) {
|
||||||
if (!base::contains(idsChanged, dcId)) {
|
if (!base::contains(idsChanged, dcId)) {
|
||||||
|
|
Loading…
Reference in New Issue