Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/audio_provider_factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <libaegisub/string.h>

#include <algorithm>
#include <initializer_list>
#include <vector>

using namespace agi;

Expand All @@ -42,7 +42,11 @@ struct factory {
std::vector<const char *> extensions;
};

const std::initializer_list<factory> providers = {
// This can't be a std::initializer_list: GCC (at least 13 to 16.2) zeroes the
// elements of one that can be constant-initialized (here, the ones with an
// empty extensions list) when others can't be, leaving a null name.
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126472
const std::vector<factory> providers = {
{"Dummy", CreateDummyAudioProvider, true, {}},
{"PCM", CreatePCMAudioProvider, true, {".w64", ".wav"}},
#ifdef WITH_FFMS2
Expand Down
8 changes: 6 additions & 2 deletions src/video_provider_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include <wx/translation.h>

#include <algorithm>
#include <initializer_list>
#include <vector>

std::unique_ptr<VideoProvider> CreateDummyVideoProvider(agi::fs::path const&, agi::ycbcr::Header, agi::BackgroundRunner *);
std::unique_ptr<VideoProvider> CreateYUV4MPEGVideoProvider(agi::fs::path const&, agi::ycbcr::Header, agi::BackgroundRunner *);
Expand All @@ -45,7 +45,11 @@ namespace {
std::vector<const char *> extensions;
};

const std::initializer_list<factory> providers = {
// This can't be a std::initializer_list: GCC (at least 13 to 16.2) zeroes the
// elements of one that can be constant-initialized (here, the ones with an
// empty extensions list) when others can't be, leaving a null name.
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126472
const std::vector<factory> providers = {
{"Dummy", CreateDummyVideoProvider, true, {}},
{"YUV4MPEG", CreateYUV4MPEGVideoProvider, true, {".y4m", ".yuv"}},
#ifdef WITH_FFMS2
Expand Down
Loading