Fix build for Xcode.

This commit is contained in:
John Preston 2019-06-28 17:32:21 +02:00
parent ad1816cb7c
commit 53a3d0038c
7 changed files with 13 additions and 11 deletions

View File

@ -10,6 +10,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "base/basic_types.h"
#include <gsl/gsl>
#include <gsl/gsl_byte>
#include <vector>
#include <array>
namespace bytes {

View File

@ -481,7 +481,7 @@ public:
return compare()(key, where->first) ? impl().end() : where;
}
template <typename OtherKey, typename = typename Compare::is_transparent>
template <typename OtherKey>
iterator findFirst(const OtherKey &key) {
if (empty()
|| compare()(key, front().first)
@ -492,7 +492,7 @@ public:
return compare()(key, where->first) ? impl().end() : where;
}
template <typename OtherKey, typename = typename Compare::is_transparent>
template <typename OtherKey>
const_iterator findFirst(const OtherKey &key) const {
if (empty()
|| compare()(key, front().first)
@ -810,13 +810,13 @@ public:
const_iterator find(const Key &key) const {
return this->findFirst(key);
}
template <typename OtherKey, typename = typename Compare::is_transparent>
template <typename OtherKey>
iterator find(const OtherKey &key) {
return this->findFirst<OtherKey>(key);
return this->template findFirst<OtherKey>(key);
}
template <typename OtherKey, typename = typename Compare::is_transparent>
template <typename OtherKey>
const_iterator find(const OtherKey &key) const {
return this->findFirst<OtherKey>(key);
return this->template findFirst<OtherKey>(key);
}
Type &operator[](const Key &key) {

View File

@ -1101,7 +1101,7 @@ auto LottieFromDocument(
QSize box) {
const auto data = document->data();
const auto filepath = document->filepath();
if (box.width() & box.height() > kDontCacheLottieAfterArea) {
if (box.width() * box.height() > kDontCacheLottieAfterArea) {
// Don't use frame caching for large stickers.
return method(
Lottie::ReadContent(data, filepath),

View File

@ -483,6 +483,7 @@ bool Cache::readHeader(const FrameRequest &request) {
|| request.size(original) != size) {
return false;
}
_encoder = static_cast<Encoder>(encoder);
_size = size;
_original = original;
_frameRate = frameRate;
@ -608,7 +609,7 @@ void Cache::writeHeader() {
QDataStream stream(&_data, QIODevice::WriteOnly);
stream
<< static_cast<qint32>(Encoder::YUV420A4_LZ4)
<< static_cast<qint32>(_encoder)
<< _size
<< _original
<< qint32(_frameRate)

View File

@ -121,7 +121,6 @@ private:
int _offsetFrameIndex = 0;
Encoder _encoder = Encoder::YUV420A4_LZ4;
FnMut<void(QByteArray &&cached)> _put;
bool _changed = false;
};

View File

@ -172,7 +172,7 @@ void MultiPlayer::checkNextFrameRender() {
void MultiPlayer::updateFrameRequest(
not_null<const Animation*> animation,
const FrameRequest &request) {
const auto i = _active.find(animation.get());
const auto i = _active.find(animation);
Assert(i != _active.end());
_renderer->updateFrameRequest(i->second, request);

@ -1 +1 @@
Subproject commit 1f0d4470b1234e31c75a4186abd59759d8142414
Subproject commit 9ea870038a2a667add7f621be6252db909068386