Beta version 4.15.3: Fix build with GCC.
This commit is contained in:
parent
a888b8d846
commit
0410d05913
|
@ -234,7 +234,7 @@ RepliesWidget::RepliesWidget(
|
||||||
_topic->owningHistory())
|
_topic->owningHistory())
|
||||||
) | rpl::map([=] {
|
) | rpl::map([=] {
|
||||||
return session().data().scheduledMessages().hasFor(_topic);
|
return session().data().scheduledMessages().hasFor(_topic);
|
||||||
})
|
}) | rpl::type_erased()
|
||||||
: rpl::single(false),
|
: rpl::single(false),
|
||||||
}))
|
}))
|
||||||
, _translateBar(std::make_unique<TranslateBar>(this, controller, history))
|
, _translateBar(std::make_unique<TranslateBar>(this, controller, history))
|
||||||
|
|
|
@ -239,7 +239,7 @@ void ScheduledWidget::setupComposeControls() {
|
||||||
.text = std::move(*text),
|
.text = std::move(*text),
|
||||||
.type = Controls::WriteRestrictionType::Rights,
|
.type = Controls::WriteRestrictionType::Rights,
|
||||||
} : Controls::WriteRestriction();
|
} : Controls::WriteRestriction();
|
||||||
});
|
}) | rpl::type_erased();
|
||||||
}()
|
}()
|
||||||
: [&] {
|
: [&] {
|
||||||
return rpl::combine(
|
return rpl::combine(
|
||||||
|
@ -265,7 +265,7 @@ void ScheduledWidget::setupComposeControls() {
|
||||||
.text = std::move(*text),
|
.text = std::move(*text),
|
||||||
.type = Controls::WriteRestrictionType::Rights,
|
.type = Controls::WriteRestrictionType::Rights,
|
||||||
} : Controls::WriteRestriction();
|
} : Controls::WriteRestriction();
|
||||||
});
|
}) | rpl::type_erased();
|
||||||
}();
|
}();
|
||||||
_composeControls->setHistory({
|
_composeControls->setHistory({
|
||||||
.history = _history.get(),
|
.history = _history.get(),
|
||||||
|
|
|
@ -58,13 +58,6 @@ constexpr auto kGeoPointZoomMin = 13;
|
||||||
constexpr auto kMaxLoadParts = 5;
|
constexpr auto kMaxLoadParts = 5;
|
||||||
constexpr auto kKeepLoadingParts = 8;
|
constexpr auto kKeepLoadingParts = 8;
|
||||||
|
|
||||||
[[nodiscard]] Storage::Cache::Key IvBaseCacheKey(
|
|
||||||
not_null<DocumentData*> document) {
|
|
||||||
auto big = document->bigFileBaseCacheKey();
|
|
||||||
big.low += 0x7FF;
|
|
||||||
return big;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
class Shown final : public base::has_weak_ptr {
|
class Shown final : public base::has_weak_ptr {
|
||||||
|
@ -545,9 +538,9 @@ void Shown::streamFile(FileStream &file, Webview::DataRequest request) {
|
||||||
constexpr auto kPart = Media::Streaming::Loader::kPartSize;
|
constexpr auto kPart = Media::Streaming::Loader::kPartSize;
|
||||||
const auto size = file.document->size;
|
const auto size = file.document->size;
|
||||||
const auto last = int((size + kPart - 1) / kPart);
|
const auto last = int((size + kPart - 1) / kPart);
|
||||||
const auto from = int(std::min(request.offset, size) / kPart);
|
const auto from = int(std::min(int64(request.offset), size) / kPart);
|
||||||
const auto till = (request.limit > 0)
|
const auto till = (request.limit > 0)
|
||||||
? std::min(request.offset + request.limit, size)
|
? std::min(int64(request.offset + request.limit), size)
|
||||||
: size;
|
: size;
|
||||||
const auto parts = std::min(
|
const auto parts = std::min(
|
||||||
int((till + kPart - 1) / kPart) - from,
|
int((till + kPart - 1) / kPart) - from,
|
||||||
|
|
|
@ -529,7 +529,6 @@ QByteArray Parser::block(
|
||||||
const auto collage = !layout.geometry.isEmpty();
|
const auto collage = !layout.geometry.isEmpty();
|
||||||
const auto collageSmall = collage
|
const auto collageSmall = collage
|
||||||
&& (layout.geometry.width() < outer.width());
|
&& (layout.geometry.width() < outer.width());
|
||||||
const auto slideshow = !collage && !outer.isEmpty();
|
|
||||||
const auto video = documentById(data.vvideo_id().v);
|
const auto video = documentById(data.vvideo_id().v);
|
||||||
if (!video.id) {
|
if (!video.id) {
|
||||||
return "Video not found.";
|
return "Video not found.";
|
||||||
|
@ -1154,7 +1153,6 @@ QByteArray Parser::embedUrl(const QByteArray &html) {
|
||||||
};
|
};
|
||||||
auto result = QByteArray();
|
auto result = QByteArray();
|
||||||
result.reserve(binary.size() * 2);
|
result.reserve(binary.size() * 2);
|
||||||
auto index = 0;
|
|
||||||
for (const auto byte : binary) {
|
for (const auto byte : binary) {
|
||||||
result.push_back(hex(byte / 16));
|
result.push_back(hex(byte / 16));
|
||||||
result.push_back(hex(byte % 16));
|
result.push_back(hex(byte % 16));
|
||||||
|
|
Loading…
Reference in New Issue