Skip to content

Commit

Permalink
add missing includes
Browse files Browse the repository at this point in the history
fixes issues when building with LTO
  • Loading branch information
odrling committed Jun 15, 2024
1 parent 506cec5 commit 9fb382c
Show file tree
Hide file tree
Showing 55 changed files with 107 additions and 6 deletions.
2 changes: 2 additions & 0 deletions libaegisub/ass/dialogue_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include <boost/locale/boundary/segment.hpp>
#include <boost/locale/boundary/types.hpp>

#include <cstring>

namespace {

typedef std::vector<agi::ass::DialogueToken> TokenVec;
Expand Down
1 change: 1 addition & 0 deletions libaegisub/ass/uuencode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#include <libaegisub/ass/uuencode.h>

#include <cstring>
#include <algorithm>

// Despite being called uuencoding by ass_specs.doc, the format is actually
Expand Down
1 change: 1 addition & 0 deletions libaegisub/common/cajun/reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Author: Terry Caton

#include <boost/interprocess/streams/bufferstream.hpp>
#include <cassert>
#include <algorithm>

/*
Expand Down
1 change: 1 addition & 0 deletions libaegisub/common/calltip_provider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#include "libaegisub/ass/dialogue_parser.h"

#include <cstring>
#include <algorithm>

namespace {
Expand Down
2 changes: 2 additions & 0 deletions libaegisub/common/character_count.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include <unicode/uchar.h>
#include <unicode/utf8.h>

#include <algorithm>
#include <cstring>
#include <mutex>
#include <unicode/brkiter.h>

Expand Down
2 changes: 2 additions & 0 deletions libaegisub/common/mru.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include "libaegisub/option.h"
#include "libaegisub/option_value.h"

#include <algorithm>

namespace {
const char *mru_names[] = {
"Audio",
Expand Down
1 change: 1 addition & 0 deletions libaegisub/include/libaegisub/file_mapping.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#include <boost/interprocess/detail/os_file_functions.hpp>
#include <cstdint>
#include <memory>

namespace agi {
// boost::interprocess::file_mapping is awesome and uses CreateFileA on Windows
Expand Down
1 change: 1 addition & 0 deletions libaegisub/include/libaegisub/lua/ffi.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#include <cstdlib>
#include <lua.hpp>
#include <cstring>

namespace agi { namespace lua {
void do_register_lib_function(lua_State *L, const char *name, const char *type_name, void *func);
Expand Down
2 changes: 2 additions & 0 deletions libaegisub/unix/path.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include <boost/filesystem/operations.hpp>
#include <pwd.h>

#include "../../acconf.h"

#ifndef __APPLE__
#include <fstream>
#include <stdlib.h>
Expand Down
1 change: 1 addition & 0 deletions src/aegisublocale.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include "compat.h"
#include "options.h"
#include "utils.h"
#include "acconf.h"

#include <libaegisub/path.h>

Expand Down
3 changes: 3 additions & 0 deletions src/audio_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
#include "audio_controller.h"
#include "factory_manager.h"
#include "options.h"
#include "acconf.h"

#include <array>

#include <boost/range/iterator_range.hpp>

Expand Down
2 changes: 2 additions & 0 deletions src/audio_player_alsa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
/// @ingroup audio_output
///

#include "acconf.h"

#ifdef WITH_ALSA
#include "include/aegisub/audio_player.h"

Expand Down
2 changes: 2 additions & 0 deletions src/audio_player_dsound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
/// @ingroup audio_output
///

#include "acconf.h"

#ifdef WITH_DIRECTSOUND
#include "include/aegisub/audio_player.h"

Expand Down
2 changes: 2 additions & 0 deletions src/audio_player_dsound2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
/// @ingroup audio_output
///

#include "acconf.h"

#ifdef WITH_DIRECTSOUND
#include "include/aegisub/audio_player.h"

Expand Down
2 changes: 2 additions & 0 deletions src/audio_player_openal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
/// @ingroup audio_output
///

#include "acconf.h"

#ifdef WITH_OPENAL
#include "include/aegisub/audio_player.h"

Expand Down
2 changes: 2 additions & 0 deletions src/audio_player_oss.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
/// @ingroup audio_output
///

#include "acconf.h"

#ifdef WITH_OSS
#include "include/aegisub/audio_player.h"

Expand Down
2 changes: 2 additions & 0 deletions src/audio_player_portaudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
/// @ingroup audio_output
///

#include "acconf.h"

#ifdef WITH_PORTAUDIO
#include "audio_player_portaudio.h"

Expand Down
2 changes: 2 additions & 0 deletions src/audio_player_portaudio.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
/// @ingroup audio_output
///

#include "acconf.h"

#ifdef WITH_PORTAUDIO

#include "include/aegisub/audio_player.h"
Expand Down
2 changes: 2 additions & 0 deletions src/audio_player_pulse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
/// @ingroup audio_output
///

#include "acconf.h"

#ifdef WITH_LIBPULSE
#include "include/aegisub/audio_player.h"

Expand Down
2 changes: 2 additions & 0 deletions src/audio_player_xaudio2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
//
// Aegisub Project http://www.aegisub.org/

#include "acconf.h"

#ifdef WITH_XAUDIO2
#include "include/aegisub/audio_player.h"

Expand Down
2 changes: 2 additions & 0 deletions src/audio_provider_avs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
/// @ingroup audio_input
///

#include "acconf.h"

#ifdef WITH_AVISYNTH
#include <libaegisub/audio/provider.h>

Expand Down
5 changes: 4 additions & 1 deletion src/audio_provider_bestsource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
/// @ingroup audio_input bestsource
///

#include "acconf.h"

#ifdef WITH_BESTSOURCE
#include <libaegisub/audio/provider.h>

Expand All @@ -36,6 +38,8 @@

#include <map>

#include <wx/intl.h>

namespace {
class BSAudioProvider final : public agi::AudioProvider {
std::map<std::string, std::string> bsopts;
Expand Down Expand Up @@ -105,4 +109,3 @@ std::unique_ptr<agi::AudioProvider> CreateBSAudioProvider(agi::fs::path const& f
}

#endif /* WITH_BESTSOURCE */

4 changes: 4 additions & 0 deletions src/audio_provider_factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@

#include <boost/range/iterator_range.hpp>

#include <wx/choicdlg.h>

#include "acconf.h"

using namespace agi;

std::unique_ptr<AudioProvider> CreateAvisynthAudioProvider(fs::path const& filename, BackgroundRunner *);
Expand Down
2 changes: 2 additions & 0 deletions src/audio_provider_ffmpegsource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
/// @ingroup audio_input ffms
///

#include "acconf.h"

#ifdef WITH_FFMS2
#include <libaegisub/audio/provider.h>

Expand Down
2 changes: 2 additions & 0 deletions src/audio_provider_vs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
/// @ingroup audio_input
///

#include "acconf.h"

#ifdef WITH_VAPOURSYNTH
#include <libaegisub/audio/provider.h>

Expand Down
3 changes: 2 additions & 1 deletion src/base_grid.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@
#include <libaegisub/signal.h>

#include <memory>
#include <string>
#include <vector>
#include <wx/window.h>
#include <wx/scrolbar.h>
#include <wx/brush.h>

namespace agi {
struct Context;
Expand Down
4 changes: 4 additions & 0 deletions src/bestsource_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
/// @ingroup video_input audio_input ffms
///

#include "acconf.h"

#ifdef WITH_BESTSOURCE
#include "bestsource_common.h"
#include "tracklist.h"
Expand All @@ -37,6 +39,8 @@ extern "C" {
#include <boost/crc.hpp>
#include <boost/filesystem/path.hpp>

#include <wx/choicdlg.h>

namespace provider_bs {

std::pair<TrackSelection, bool> SelectTrack(agi::fs::path const& filename, bool audio) {
Expand Down
5 changes: 5 additions & 0 deletions src/bestsource_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,13 @@
/// @ingroup video_input audio_input ffms
///

#include "acconf.h"

#ifdef WITH_BESTSOURCE

#include <libaegisub/fs_fwd.h>
#include <string>

#include <bsshared.h>

#include <libaegisub/fs_fwd.h>
Expand Down
1 change: 1 addition & 0 deletions src/colour_button.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#include "dialogs.h"

#include <boost/version.hpp>
#include <boost/gil.hpp>

AGI_DEFINE_EVENT(EVT_COLOR, agi::Color);
Expand Down
1 change: 1 addition & 0 deletions src/command/command.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <boost/algorithm/string/join.hpp>
#include "include/aegisub/hotkey.h"

#include <map>
#include <wx/intl.h>

namespace cmd {
Expand Down
2 changes: 2 additions & 0 deletions src/command/command.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@

#include <libaegisub/exception.h>

#include <memory>

namespace agi { struct Context; }

#define CMD_NAME(a) const char* name() const override { return a; }
Expand Down
1 change: 1 addition & 0 deletions src/dialog_align.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
#include <wx/dialog.h>
#include <wx/sizer.h>
#include <wx/textctrl.h>
#include <boost/version.hpp>
#if BOOST_VERSION >= 106900
#include <boost/gil.hpp>
#else
Expand Down
1 change: 1 addition & 0 deletions src/dialog_colorpicker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@

#include <memory>
#include <vector>
#include <algorithm>

#include <wx/bitmap.h>
#include <wx/button.h>
Expand Down
1 change: 1 addition & 0 deletions src/dialog_dummy_video.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "options.h"
#include "validators.h"
#include "video_provider_dummy.h"
#include "wx/valtext.h"

#include <libaegisub/ass/time.h>
#include <libaegisub/color.h>
Expand Down
2 changes: 2 additions & 0 deletions src/ffmpegsource_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
/// @ingroup video_input audio_input ffms
///

#include "acconf.h"

#ifdef WITH_FFMS2
#include "ffmpegsource_common.h"

Expand Down
3 changes: 3 additions & 0 deletions src/ffmpegsource_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,16 @@
/// @ingroup video_input audio_input ffms
///

#include "acconf.h"

#ifdef WITH_FFMS2
#include <map>

#include <ffms.h>

#include <libaegisub/fs_fwd.h>
#include <libaegisub/scoped_ptr.h>
#include <string>

namespace agi { class BackgroundRunner; }

Expand Down
1 change: 1 addition & 0 deletions src/frame_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
#include <wx/sizer.h>
#include <wx/statline.h>
#include <wx/sysopt.h>
#include <wx/toolbar.h>

enum {
ID_APP_TIMER_STATUSCLEAR = 12002
Expand Down
1 change: 1 addition & 0 deletions src/image_position_picker.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <wx/wx.h>
#include <wx/sizer.h>
#include "gl_wrap.h"
#include <functional>

typedef std::function<void(double, double, unsigned char, unsigned char, unsigned char)> updator;

Expand Down
2 changes: 2 additions & 0 deletions src/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@

#include "aegisublocale.h"

#include <vector>

#ifndef wxUSE_EXCEPTIONS
#error wxWidgets is compiled without exceptions support. Aegisub requires exceptions support in wxWidgets to run safely.
#endif
Expand Down
1 change: 1 addition & 0 deletions src/preferences.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@

#include <wx/checkbox.h>
#include <wx/combobox.h>
#include <wx/dc.h>
#include <wx/event.h>
#include <wx/listctrl.h>
#include <wx/msgdlg.h>
Expand Down
1 change: 1 addition & 0 deletions src/preferences_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include <wx/panel.h>
#include <wx/scrolwin.h>
#include <wx/textctrl.h>

class Preferences;
class wxControl;
Expand Down
Loading

0 comments on commit 9fb382c

Please sign in to comment.