Beta version 4.15.3: Fix build with GCC.

This commit is contained in:
John Preston 2024-03-13 22:27:25 +04:00
parent a888b8d846
commit 0410d05913
4 changed files with 5 additions and 14 deletions

View File

@ -234,7 +234,7 @@ RepliesWidget::RepliesWidget(
_topic->owningHistory())
) | rpl::map([=] {
return session().data().scheduledMessages().hasFor(_topic);
})
}) | rpl::type_erased()
: rpl::single(false),
}))
, _translateBar(std::make_unique<TranslateBar>(this, controller, history))

View File

@ -239,7 +239,7 @@ void ScheduledWidget::setupComposeControls() {
.text = std::move(*text),
.type = Controls::WriteRestrictionType::Rights,
} : Controls::WriteRestriction();
});
}) | rpl::type_erased();
}()
: [&] {
return rpl::combine(
@ -265,7 +265,7 @@ void ScheduledWidget::setupComposeControls() {
.text = std::move(*text),
.type = Controls::WriteRestrictionType::Rights,
} : Controls::WriteRestriction();
});
}) | rpl::type_erased();
}();
_composeControls->setHistory({
.history = _history.get(),

View File

@ -58,13 +58,6 @@ constexpr auto kGeoPointZoomMin = 13;
constexpr auto kMaxLoadParts = 5;
constexpr auto kKeepLoadingParts = 8;
[[nodiscard]] Storage::Cache::Key IvBaseCacheKey(
not_null<DocumentData*> document) {
auto big = document->bigFileBaseCacheKey();
big.low += 0x7FF;
return big;
}
} // namespace
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;
const auto size = file.document->size;
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)
? std::min(request.offset + request.limit, size)
? std::min(int64(request.offset + request.limit), size)
: size;
const auto parts = std::min(
int((till + kPart - 1) / kPart) - from,

View File

@ -529,7 +529,6 @@ QByteArray Parser::block(
const auto collage = !layout.geometry.isEmpty();
const auto collageSmall = collage
&& (layout.geometry.width() < outer.width());
const auto slideshow = !collage && !outer.isEmpty();
const auto video = documentById(data.vvideo_id().v);
if (!video.id) {
return "Video not found.";
@ -1154,7 +1153,6 @@ QByteArray Parser::embedUrl(const QByteArray &html) {
};
auto result = QByteArray();
result.reserve(binary.size() * 2);
auto index = 0;
for (const auto byte : binary) {
result.push_back(hex(byte / 16));
result.push_back(hex(byte % 16));