Skip to content

Commit

Permalink
Beta version 4.15.3: Fix build with GCC.
Browse files Browse the repository at this point in the history
  • Loading branch information
john-preston committed Mar 13, 2024
1 parent a888b8d commit 0410d05
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ void ScheduledWidget::setupComposeControls() {
.text = std::move(*text),
.type = Controls::WriteRestrictionType::Rights,
} : Controls::WriteRestriction();
});
}) | rpl::type_erased();
}()
: [&] {
return rpl::combine(
Expand All @@ -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(),
Expand Down
11 changes: 2 additions & 9 deletions Telegram/SourceFiles/iv/iv_instance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 0 additions & 2 deletions Telegram/SourceFiles/iv/iv_prepare.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.";
Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit 0410d05

Please sign in to comment.