add missing includes

fixes issues when building with LTO
This commit is contained in:
odrling 2023-09-28 06:52:50 +02:00
parent 1acbf897ff
commit f16bb61c9d
No known key found for this signature in database
GPG Key ID: EC907F69A27A90C5
55 changed files with 109 additions and 6 deletions

View File

@ -22,6 +22,8 @@
#include <boost/locale/boundary/segment.hpp> #include <boost/locale/boundary/segment.hpp>
#include <boost/locale/boundary/types.hpp> #include <boost/locale/boundary/types.hpp>
#include <cstring>
namespace { namespace {
typedef std::vector<agi::ass::DialogueToken> TokenVec; typedef std::vector<agi::ass::DialogueToken> TokenVec;

View File

@ -16,6 +16,7 @@
#include <libaegisub/ass/uuencode.h> #include <libaegisub/ass/uuencode.h>
#include <cstring>
#include <algorithm> #include <algorithm>
// Despite being called uuencoding by ass_specs.doc, the format is actually // Despite being called uuencoding by ass_specs.doc, the format is actually

View File

@ -10,6 +10,7 @@ Author: Terry Caton
#include <boost/interprocess/streams/bufferstream.hpp> #include <boost/interprocess/streams/bufferstream.hpp>
#include <cassert> #include <cassert>
#include <algorithm>
/* /*

View File

@ -18,6 +18,7 @@
#include "libaegisub/ass/dialogue_parser.h" #include "libaegisub/ass/dialogue_parser.h"
#include <cstring>
#include <algorithm> #include <algorithm>
namespace { namespace {

View File

@ -22,6 +22,8 @@
#include <unicode/uchar.h> #include <unicode/uchar.h>
#include <unicode/utf8.h> #include <unicode/utf8.h>
#include <algorithm>
#include <cstring>
#include <mutex> #include <mutex>
#include <unicode/brkiter.h> #include <unicode/brkiter.h>

View File

@ -22,6 +22,8 @@
#include "libaegisub/option.h" #include "libaegisub/option.h"
#include "libaegisub/option_value.h" #include "libaegisub/option_value.h"
#include <algorithm>
namespace { namespace {
const char *mru_names[] = { const char *mru_names[] = {
"Audio", "Audio",

View File

@ -18,6 +18,7 @@
#include <boost/interprocess/detail/os_file_functions.hpp> #include <boost/interprocess/detail/os_file_functions.hpp>
#include <cstdint> #include <cstdint>
#include <memory>
namespace agi { namespace agi {
// boost::interprocess::file_mapping is awesome and uses CreateFileA on Windows // boost::interprocess::file_mapping is awesome and uses CreateFileA on Windows

View File

@ -18,6 +18,7 @@
#include <cstdlib> #include <cstdlib>
#include <lua.hpp> #include <lua.hpp>
#include <cstring>
namespace agi { namespace lua { namespace agi { namespace lua {
void do_register_lib_function(lua_State *L, const char *name, const char *type_name, void *func); void do_register_lib_function(lua_State *L, const char *name, const char *type_name, void *func);

View File

@ -22,6 +22,8 @@
#include <boost/filesystem/operations.hpp> #include <boost/filesystem/operations.hpp>
#include <pwd.h> #include <pwd.h>
#include "../../acconf.h"
#ifndef __APPLE__ #ifndef __APPLE__
#include <fstream> #include <fstream>
#include <stdlib.h> #include <stdlib.h>

View File

@ -37,6 +37,7 @@
#include "compat.h" #include "compat.h"
#include "options.h" #include "options.h"
#include "utils.h" #include "utils.h"
#include "acconf.h"
#include <libaegisub/path.h> #include <libaegisub/path.h>

View File

@ -37,6 +37,9 @@
#include "audio_controller.h" #include "audio_controller.h"
#include "factory_manager.h" #include "factory_manager.h"
#include "options.h" #include "options.h"
#include "acconf.h"
#include <array>
#include <boost/range/iterator_range.hpp> #include <boost/range/iterator_range.hpp>

View File

@ -32,6 +32,8 @@
/// @ingroup audio_output /// @ingroup audio_output
/// ///
#include "acconf.h"
#ifdef WITH_ALSA #ifdef WITH_ALSA
#include "include/aegisub/audio_player.h" #include "include/aegisub/audio_player.h"

View File

@ -32,6 +32,8 @@
/// @ingroup audio_output /// @ingroup audio_output
/// ///
#include "acconf.h"
#ifdef WITH_DIRECTSOUND #ifdef WITH_DIRECTSOUND
#include "include/aegisub/audio_player.h" #include "include/aegisub/audio_player.h"

View File

@ -32,6 +32,8 @@
/// @ingroup audio_output /// @ingroup audio_output
/// ///
#include "acconf.h"
#ifdef WITH_DIRECTSOUND #ifdef WITH_DIRECTSOUND
#include "include/aegisub/audio_player.h" #include "include/aegisub/audio_player.h"

View File

@ -32,6 +32,8 @@
/// @ingroup audio_output /// @ingroup audio_output
/// ///
#include "acconf.h"
#ifdef WITH_OPENAL #ifdef WITH_OPENAL
#include "include/aegisub/audio_player.h" #include "include/aegisub/audio_player.h"

View File

@ -30,6 +30,8 @@
/// @ingroup audio_output /// @ingroup audio_output
/// ///
#include "acconf.h"
#ifdef WITH_OSS #ifdef WITH_OSS
#include "include/aegisub/audio_player.h" #include "include/aegisub/audio_player.h"

View File

@ -32,6 +32,8 @@
/// @ingroup audio_output /// @ingroup audio_output
/// ///
#include "acconf.h"
#ifdef WITH_PORTAUDIO #ifdef WITH_PORTAUDIO
#include "audio_player_portaudio.h" #include "audio_player_portaudio.h"

View File

@ -32,6 +32,8 @@
/// @ingroup audio_output /// @ingroup audio_output
/// ///
#include "acconf.h"
#ifdef WITH_PORTAUDIO #ifdef WITH_PORTAUDIO
#include "include/aegisub/audio_player.h" #include "include/aegisub/audio_player.h"

View File

@ -32,6 +32,8 @@
/// @ingroup audio_output /// @ingroup audio_output
/// ///
#include "acconf.h"
#ifdef WITH_LIBPULSE #ifdef WITH_LIBPULSE
#include "include/aegisub/audio_player.h" #include "include/aegisub/audio_player.h"

View File

@ -27,6 +27,8 @@
// //
// Aegisub Project http://www.aegisub.org/ // Aegisub Project http://www.aegisub.org/
#include "acconf.h"
#ifdef WITH_XAUDIO2 #ifdef WITH_XAUDIO2
#include "include/aegisub/audio_player.h" #include "include/aegisub/audio_player.h"

View File

@ -32,6 +32,8 @@
/// @ingroup audio_input /// @ingroup audio_input
/// ///
#include "acconf.h"
#ifdef WITH_AVISYNTH #ifdef WITH_AVISYNTH
#include <libaegisub/audio/provider.h> #include <libaegisub/audio/provider.h>

View File

@ -19,6 +19,8 @@
/// @ingroup audio_input bestsource /// @ingroup audio_input bestsource
/// ///
#include "acconf.h"
#ifdef WITH_BESTSOURCE #ifdef WITH_BESTSOURCE
#include <libaegisub/audio/provider.h> #include <libaegisub/audio/provider.h>
@ -36,6 +38,8 @@
#include <map> #include <map>
#include <wx/intl.h>
namespace { namespace {
class BSAudioProvider final : public agi::AudioProvider { class BSAudioProvider final : public agi::AudioProvider {
std::map<std::string, std::string> bsopts; std::map<std::string, std::string> bsopts;
@ -105,4 +109,3 @@ std::unique_ptr<agi::AudioProvider> CreateBSAudioProvider(agi::fs::path const& f
} }
#endif /* WITH_BESTSOURCE */ #endif /* WITH_BESTSOURCE */

View File

@ -29,6 +29,10 @@
#include <boost/range/iterator_range.hpp> #include <boost/range/iterator_range.hpp>
#include <wx/choicdlg.h>
#include "acconf.h"
using namespace agi; using namespace agi;
std::unique_ptr<AudioProvider> CreateAvisynthAudioProvider(fs::path const& filename, BackgroundRunner *); std::unique_ptr<AudioProvider> CreateAvisynthAudioProvider(fs::path const& filename, BackgroundRunner *);

View File

@ -32,6 +32,8 @@
/// @ingroup audio_input ffms /// @ingroup audio_input ffms
/// ///
#include "acconf.h"
#ifdef WITH_FFMS2 #ifdef WITH_FFMS2
#include <libaegisub/audio/provider.h> #include <libaegisub/audio/provider.h>

View File

@ -19,6 +19,8 @@
/// @ingroup audio_input /// @ingroup audio_input
/// ///
#include "acconf.h"
#ifdef WITH_VAPOURSYNTH #ifdef WITH_VAPOURSYNTH
#include <libaegisub/audio/provider.h> #include <libaegisub/audio/provider.h>

View File

@ -30,9 +30,10 @@
#include <libaegisub/signal.h> #include <libaegisub/signal.h>
#include <memory> #include <memory>
#include <string>
#include <vector> #include <vector>
#include <wx/window.h> #include <wx/window.h>
#include <wx/scrolbar.h>
#include <wx/brush.h>
namespace agi { namespace agi {
struct Context; struct Context;

View File

@ -19,6 +19,8 @@
/// @ingroup video_input audio_input ffms /// @ingroup video_input audio_input ffms
/// ///
#include "acconf.h"
#ifdef WITH_BESTSOURCE #ifdef WITH_BESTSOURCE
#include "bestsource_common.h" #include "bestsource_common.h"
#include "tracklist.h" #include "tracklist.h"
@ -37,6 +39,8 @@ extern "C" {
#include <boost/crc.hpp> #include <boost/crc.hpp>
#include <boost/filesystem/path.hpp> #include <boost/filesystem/path.hpp>
#include <wx/choicdlg.h>
namespace provider_bs { namespace provider_bs {
std::pair<TrackSelection, bool> SelectTrack(agi::fs::path const& filename, bool audio) { std::pair<TrackSelection, bool> SelectTrack(agi::fs::path const& filename, bool audio) {

View File

@ -19,8 +19,13 @@
/// @ingroup video_input audio_input ffms /// @ingroup video_input audio_input ffms
/// ///
#include "acconf.h"
#ifdef WITH_BESTSOURCE #ifdef WITH_BESTSOURCE
#include <libaegisub/fs_fwd.h>
#include <string>
#include <bsshared.h> #include <bsshared.h>
#include <libaegisub/fs_fwd.h> #include <libaegisub/fs_fwd.h>

View File

@ -18,6 +18,7 @@
#include "dialogs.h" #include "dialogs.h"
#include <boost/version.hpp>
#include <boost/gil.hpp> #include <boost/gil.hpp>
AGI_DEFINE_EVENT(EVT_COLOR, agi::Color); AGI_DEFINE_EVENT(EVT_COLOR, agi::Color);

View File

@ -22,6 +22,7 @@
#include <boost/algorithm/string/join.hpp> #include <boost/algorithm/string/join.hpp>
#include "include/aegisub/hotkey.h" #include "include/aegisub/hotkey.h"
#include <map>
#include <wx/intl.h> #include <wx/intl.h>
namespace cmd { namespace cmd {

View File

@ -28,6 +28,8 @@
#include <libaegisub/exception.h> #include <libaegisub/exception.h>
#include <memory>
namespace agi { struct Context; } namespace agi { struct Context; }
#define CMD_NAME(a) const char* name() const override { return a; } #define CMD_NAME(a) const char* name() const override { return a; }

View File

@ -51,6 +51,7 @@
#include <wx/dialog.h> #include <wx/dialog.h>
#include <wx/sizer.h> #include <wx/sizer.h>
#include <wx/textctrl.h> #include <wx/textctrl.h>
#include <boost/version.hpp>
#if BOOST_VERSION >= 106900 #if BOOST_VERSION >= 106900
#include <boost/gil.hpp> #include <boost/gil.hpp>
#else #else

View File

@ -41,6 +41,7 @@
#include <memory> #include <memory>
#include <vector> #include <vector>
#include <algorithm>
#include <wx/bitmap.h> #include <wx/bitmap.h>
#include <wx/button.h> #include <wx/button.h>

View File

@ -22,6 +22,7 @@
#include "options.h" #include "options.h"
#include "validators.h" #include "validators.h"
#include "video_provider_dummy.h" #include "video_provider_dummy.h"
#include "wx/valtext.h"
#include <libaegisub/ass/time.h> #include <libaegisub/ass/time.h>
#include <libaegisub/color.h> #include <libaegisub/color.h>

View File

@ -32,6 +32,8 @@
/// @ingroup video_input audio_input ffms /// @ingroup video_input audio_input ffms
/// ///
#include "acconf.h"
#ifdef WITH_FFMS2 #ifdef WITH_FFMS2
#include "ffmpegsource_common.h" #include "ffmpegsource_common.h"

View File

@ -32,6 +32,8 @@
/// @ingroup video_input audio_input ffms /// @ingroup video_input audio_input ffms
/// ///
#include "acconf.h"
#ifdef WITH_FFMS2 #ifdef WITH_FFMS2
#include <map> #include <map>
@ -39,6 +41,7 @@
#include <libaegisub/fs_fwd.h> #include <libaegisub/fs_fwd.h>
#include <libaegisub/scoped_ptr.h> #include <libaegisub/scoped_ptr.h>
#include <string>
namespace agi { class BackgroundRunner; } namespace agi { class BackgroundRunner; }

View File

@ -68,6 +68,7 @@
#include <wx/sizer.h> #include <wx/sizer.h>
#include <wx/statline.h> #include <wx/statline.h>
#include <wx/sysopt.h> #include <wx/sysopt.h>
#include <wx/toolbar.h>
enum { enum {
ID_APP_TIMER_STATUSCLEAR = 12002 ID_APP_TIMER_STATUSCLEAR = 12002

View File

@ -1,6 +1,7 @@
#include <wx/wx.h> #include <wx/wx.h>
#include <wx/sizer.h> #include <wx/sizer.h>
#include "gl_wrap.h" #include "gl_wrap.h"
#include <functional>
typedef std::function<void(double, double, unsigned char, unsigned char, unsigned char)> updator; typedef std::function<void(double, double, unsigned char, unsigned char, unsigned char)> updator;

View File

@ -31,6 +31,8 @@
#include "aegisublocale.h" #include "aegisublocale.h"
#include <vector>
#ifndef wxUSE_EXCEPTIONS #ifndef wxUSE_EXCEPTIONS
#error wxWidgets is compiled without exceptions support. Aegisub requires exceptions support in wxWidgets to run safely. #error wxWidgets is compiled without exceptions support. Aegisub requires exceptions support in wxWidgets to run safely.
#endif #endif

View File

@ -47,6 +47,7 @@
#include <wx/checkbox.h> #include <wx/checkbox.h>
#include <wx/combobox.h> #include <wx/combobox.h>
#include <wx/dc.h>
#include <wx/event.h> #include <wx/event.h>
#include <wx/listctrl.h> #include <wx/listctrl.h>
#include <wx/msgdlg.h> #include <wx/msgdlg.h>

View File

@ -19,6 +19,7 @@
#include <wx/panel.h> #include <wx/panel.h>
#include <wx/scrolwin.h> #include <wx/scrolwin.h>
#include <wx/textctrl.h>
class Preferences; class Preferences;
class wxControl; class wxControl;

View File

@ -36,6 +36,7 @@
#include "utils.h" #include "utils.h"
#include <limits> #include <limits>
#include <algorithm>
SplineCurve::SplineCurve(Vector2D p1) : p1(p1), type(POINT) { } SplineCurve::SplineCurve(Vector2D p1) : p1(p1), type(POINT) { }
SplineCurve::SplineCurve(Vector2D p1, Vector2D p2) : p1(p1), p2(p2), type(LINE) { } SplineCurve::SplineCurve(Vector2D p1, Vector2D p2) : p1(p1), p2(p2), type(LINE) { }

View File

@ -32,6 +32,8 @@
/// @ingroup subtitle_rendering /// @ingroup subtitle_rendering
/// ///
#include "acconf.h"
#ifdef WITH_CSRI #ifdef WITH_CSRI
#include "subtitles_provider_csri.h" #include "subtitles_provider_csri.h"

View File

@ -38,6 +38,8 @@
#include <libaegisub/fs.h> #include <libaegisub/fs.h>
#include <libaegisub/log.h> #include <libaegisub/log.h>
#include <algorithm>
#ifdef __UNIX__ #ifdef __UNIX__
#include <unistd.h> #include <unistd.h>
#endif #endif
@ -181,7 +183,7 @@ void CleanCache(agi::fs::path const& directory, std::string const& file_type, ui
return; return;
} }
sort(begin(cachefiles), end(cachefiles), [](cache_item const& a, cache_item const& b) { std::sort(begin(cachefiles), end(cachefiles), [](cache_item const& a, cache_item const& b) {
return a.first < b.first; return a.first < b.first;
}); });

View File

@ -34,6 +34,7 @@
#include <cstdint> #include <cstdint>
#include <string> #include <string>
#include <wx/menu.h>
#include <wx/bitmap.h> #include <wx/bitmap.h>
#include <wx/string.h> #include <wx/string.h>

View File

@ -16,6 +16,7 @@
#include "video_frame.h" #include "video_frame.h"
#include <boost/version.hpp>
#include <boost/gil.hpp> #include <boost/gil.hpp>
#include <wx/image.h> #include <wx/image.h>

View File

@ -22,9 +22,9 @@ class wxImage;
struct VideoFrame { struct VideoFrame {
std::vector<unsigned char> data; std::vector<unsigned char> data;
size_t width; std::size_t width;
size_t height; std::size_t height;
size_t pitch; std::size_t pitch;
bool flipped; bool flipped;
}; };

View File

@ -27,6 +27,8 @@
// //
// Aegisub Project http://www.aegisub.org/ // Aegisub Project http://www.aegisub.org/
#include "acconf.h"
#ifdef WITH_AVISYNTH #ifdef WITH_AVISYNTH
#include "include/aegisub/video_provider.h" #include "include/aegisub/video_provider.h"

View File

@ -19,6 +19,8 @@
/// @ingroup video_input bestsource /// @ingroup video_input bestsource
/// ///
#include "acconf.h"
#ifdef WITH_BESTSOURCE #ifdef WITH_BESTSOURCE
#include "include/aegisub/video_provider.h" #include "include/aegisub/video_provider.h"
@ -46,6 +48,9 @@ namespace agi { class BackgroundRunner; }
#include <libaegisub/format.h> #include <libaegisub/format.h>
#include <libaegisub/scoped_ptr.h> #include <libaegisub/scoped_ptr.h>
#include <wx/intl.h>
#include <wx/msgdlg.h>
namespace { namespace {
/// @class BSVideoProvider /// @class BSVideoProvider

View File

@ -32,6 +32,8 @@
/// @ingroup video_input ffms /// @ingroup video_input ffms
/// ///
#include "acconf.h"
#ifdef WITH_FFMS2 #ifdef WITH_FFMS2
#include "ffmpegsource_common.h" #include "ffmpegsource_common.h"
#include "include/aegisub/video_provider.h" #include "include/aegisub/video_provider.h"
@ -43,6 +45,9 @@
#include <libaegisub/fs.h> #include <libaegisub/fs.h>
#include <libaegisub/make_unique.h> #include <libaegisub/make_unique.h>
#include <boost/algorithm/string.hpp>
#include <string>
namespace { namespace {
/// @class FFmpegSourceVideoProvider /// @class FFmpegSourceVideoProvider
/// @brief Implements video loading through the FFMS library. /// @brief Implements video loading through the FFMS library.

View File

@ -29,6 +29,8 @@
#include <wx/choicdlg.h> #include <wx/choicdlg.h>
#include "acconf.h"
std::unique_ptr<VideoProvider> CreateDummyVideoProvider(agi::fs::path const&, std::string const&, agi::BackgroundRunner *); std::unique_ptr<VideoProvider> CreateDummyVideoProvider(agi::fs::path const&, std::string const&, agi::BackgroundRunner *);
std::unique_ptr<VideoProvider> CreateYUV4MPEGVideoProvider(agi::fs::path const&, std::string const&, agi::BackgroundRunner *); std::unique_ptr<VideoProvider> CreateYUV4MPEGVideoProvider(agi::fs::path const&, std::string const&, agi::BackgroundRunner *);
std::unique_ptr<VideoProvider> CreateFFmpegSourceVideoProvider(agi::fs::path const&, std::string const&, agi::BackgroundRunner *); std::unique_ptr<VideoProvider> CreateFFmpegSourceVideoProvider(agi::fs::path const&, std::string const&, agi::BackgroundRunner *);

View File

@ -14,6 +14,8 @@
// //
// Aegisub Project http://www.aegisub.org/ // Aegisub Project http://www.aegisub.org/
#include "acconf.h"
#ifdef WITH_VAPOURSYNTH #ifdef WITH_VAPOURSYNTH
#include "include/aegisub/video_provider.h" #include "include/aegisub/video_provider.h"

View File

@ -45,6 +45,7 @@
#include <boost/algorithm/string/replace.hpp> #include <boost/algorithm/string/replace.hpp>
#include <algorithm> #include <algorithm>
#include <cfloat>
VisualToolBase::VisualToolBase(VideoDisplay *parent, agi::Context *context) VisualToolBase::VisualToolBase(VideoDisplay *parent, agi::Context *context)
: c(context) : c(context)

View File

@ -23,6 +23,7 @@
#include "gl_wrap.h" #include "gl_wrap.h"
#include "vector2d.h" #include "vector2d.h"
#include "options.h" #include "options.h"
#include <wx/toolbar.h>
#include <libaegisub/owning_intrusive_list.h> #include <libaegisub/owning_intrusive_list.h>
#include <libaegisub/signal.h> #include <libaegisub/signal.h>

View File

@ -19,6 +19,8 @@
#include <libaegisub/character_count.h> #include <libaegisub/character_count.h>
#include <algorithm>
TEST(lagi_character_count, basic) { TEST(lagi_character_count, basic) {
EXPECT_EQ(5, agi::CharacterCount("hello", agi::IGNORE_NONE)); EXPECT_EQ(5, agi::CharacterCount("hello", agi::IGNORE_NONE));
} }