Skip to content

Commit

Permalink
Windows build fixes
Browse files Browse the repository at this point in the history
Fixes added:
- C2036 (unknown size): templates can be used only with fully defined structs
- Incomplete type Data::Media
  • Loading branch information
EricKotato committed Sep 12, 2022
1 parent 300099a commit 52b300c
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 17 deletions.
11 changes: 0 additions & 11 deletions Telegram/SourceFiles/chat_helpers/stickers_list_widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ For license and copyright information please follow this link:
#include "window/window_session_controller.h" // GifPauseReason.
#include "main/main_session.h"
#include "main/main_session_settings.h"
#include "media/clip/media_clip_reader.h"
#include "apiwrap.h"
#include "api/api_toggling_media.h" // Api::ToggleFavedSticker
#include "styles/style_chat_helpers.h"
Expand Down Expand Up @@ -224,16 +223,6 @@ class StickersListWidget::Footer final : public TabbedSelector::InnerFooter {

};

struct StickersListWidget::Sticker {
not_null<DocumentData*> document;
std::shared_ptr<Data::DocumentMedia> documentMedia;
Lottie::Animation *lottie = nullptr;
Media::Clip::ReaderPointer webm;
QPixmap savedFrame;

void ensureMediaCreated();
};

auto StickersListWidget::PrepareStickers(
const QVector<DocumentData*> &pack)
-> std::vector<Sticker> {
Expand Down
16 changes: 10 additions & 6 deletions Telegram/SourceFiles/chat_helpers/stickers_list_widget.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ For license and copyright information please follow this link:

#include "chat_helpers/tabbed_selector.h"
#include "data/stickers/data_stickers.h"
#include "media/clip/media_clip_reader.h"
#include "base/variant.h"
#include "base/timer.h"

Expand Down Expand Up @@ -39,11 +40,6 @@ class DocumentMedia;
class StickersSet;
} // namespace Data

namespace Media::Clip {
class ReaderPointer;
enum class Notification;
} // namespace Media::Clip

namespace ChatHelpers {

struct StickerIcon;
Expand Down Expand Up @@ -118,7 +114,15 @@ class StickersListWidget final : public TabbedSelector::Inner {

private:
class Footer;
struct Sticker;
struct Sticker {
not_null<DocumentData*> document;
std::shared_ptr<Data::DocumentMedia> documentMedia;
Lottie::Animation *lottie = nullptr;
Media::Clip::ReaderPointer webm;
QPixmap savedFrame;

void ensureMediaCreated();
};

enum class Section {
Featured,
Expand Down
1 change: 1 addition & 0 deletions Telegram/SourceFiles/chat_helpers/stickers_lottie.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ For license and copyright information please follow this link:

#include "lottie/lottie_single_player.h"
#include "lottie/lottie_multi_player.h"
#include "data/data_media_types.h"
#include "data/stickers/data_stickers_set.h"
#include "data/data_document.h"
#include "data/data_document_media.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ For license and copyright information please follow this link:
#include "history/view/media/history_view_media_common.h"

#include "ui/text/format_values.h"
#include "data/data_media_types.h"
#include "data/data_document.h"
#include "data/data_wall_paper.h"
#include "history/view/history_view_element.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ For license and copyright information please follow this link:
*/
#include "inline_bots/inline_bot_layout_internal.h"

#include "data/data_media_types.h"
#include "data/data_photo.h"
#include "data/data_document.h"
#include "data/data_session.h"
Expand Down

0 comments on commit 52b300c

Please sign in to comment.