1
0
Fork 0

Throw shit at the wall until it builds with boost 1.81

This is nothing more than duct tape, do not pull.
In the long run boost::filesystem should just be replaced with
std::filesystem (as done in tgoyne/Aegisub:cmake), but this would
complicate the history and cause merge conflicts for a bunch of pulls.
Hence this horrible temporary solution.
This commit is contained in:
arch1t3cht 2023-01-26 20:18:44 +01:00
parent 0d16753d0a
commit d860c710c0
5 changed files with 14 additions and 14 deletions

View File

@ -119,7 +119,7 @@ namespace {
int get_translation(lua_State *L)
{
wxString str(check_wxstring(L, 1));
push_value(L, _(str).utf8_str());
push_value(L, std::string(_(str).utf8_str()));
return 1;
}

View File

@ -170,16 +170,16 @@ namespace Automation4 {
set_field(L, "start_time", dia->Start);
set_field(L, "end_time", dia->End);
set_field(L, "style", dia->Style);
set_field(L, "actor", dia->Actor);
set_field(L, "effect", dia->Effect);
set_field(L, "style", std::string(dia->Style));
set_field(L, "actor", std::string(dia->Actor));
set_field(L, "effect", std::string(dia->Effect));
set_field(L, "margin_l", dia->Margin[0]);
set_field(L, "margin_r", dia->Margin[1]);
set_field(L, "margin_t", dia->Margin[2]);
set_field(L, "margin_b", dia->Margin[2]);
set_field(L, "text", dia->Text);
set_field(L, "text", std::string(dia->Text));
// create extradata table
lua_newtable(L);

View File

@ -475,7 +475,7 @@ static void save_snapshot(agi::Context *c, bool raw) {
// If where ever that is isn't defined, we can't save there
if ((basepath == "\\") || (basepath == "/")) {
// So save to the current user's home dir instead
basepath = wxGetHomeDir().c_str();
basepath = std::string(wxGetHomeDir());
}
}
// Actual fixed (possibly relative) path, decode it

View File

@ -161,7 +161,7 @@ void DialogAttachments::OnExtract(wxCommandEvent &) {
// Multiple or single?
if (listView->GetNextSelected(i) != -1)
path = wxDirSelector(_("Select the path to save the files to:"), to_wx(OPT_GET("Path/Fonts Collector Destination")->GetString())).c_str();
path = std::string(wxDirSelector(_("Select the path to save the files to:"), to_wx(OPT_GET("Path/Fonts Collector Destination")->GetString())));
else {
path = SaveFileSelector(
_("Select the path to save the file to:"),

View File

@ -34,7 +34,7 @@ using namespace util;
TEST(lagi_vfr, constructors_good) {
EXPECT_NO_THROW(Framerate(1.));
EXPECT_NO_THROW(Framerate(Framerate(1.)));
EXPECT_NO_THROW(Framerate({ 0, 10 }));
EXPECT_NO_THROW(Framerate(std::initializer_list<int>({ 0, 10 })));
EXPECT_NO_THROW(Framerate("data/vfr/in/v1_start_equals_end.txt"));
EXPECT_NO_THROW(Framerate("data/vfr/in/v1_whitespace.txt"));
@ -49,9 +49,9 @@ TEST(lagi_vfr, constructors_bad_cfr) {
TEST(lagi_vfr, constructors_bad_timecodes) {
EXPECT_THROW(Framerate(std::initializer_list<int>{}), InvalidFramerate);
EXPECT_THROW(Framerate({0}), InvalidFramerate);
EXPECT_THROW(Framerate({10, 0}), InvalidFramerate);
EXPECT_THROW(Framerate({0, 0}), InvalidFramerate);
EXPECT_THROW(Framerate(std::initializer_list<int>({0})), InvalidFramerate);
EXPECT_THROW(Framerate(std::initializer_list<int>({10, 0})), InvalidFramerate);
EXPECT_THROW(Framerate(std::initializer_list<int>({0, 0})), InvalidFramerate);
}
TEST(lagi_vfr, constructors_bad_v1) {
@ -227,7 +227,7 @@ TEST(lagi_vfr, vfr_time_at_frame_end) {
TEST(lagi_vfr, vfr_time_at_frame_outside_range) {
Framerate fps;
ASSERT_NO_THROW(fps = Framerate({ 0, 100, 200 }));
ASSERT_NO_THROW(fps = Framerate(std::initializer_list<int>({ 0, 100, 200 })));
EXPECT_GT(0, fps.TimeAtFrame(-1));
EXPECT_EQ(0, fps.TimeAtFrame(0));
EXPECT_EQ(100, fps.TimeAtFrame(1));
@ -316,7 +316,7 @@ TEST(lagi_vfr, validate_save) {
TEST(lagi_vfr, save_vfr_nolen) {
Framerate fps;
ASSERT_NO_THROW(fps = Framerate({ 0, 100, 200 }));
ASSERT_NO_THROW(fps = Framerate(std::initializer_list<int>({ 0, 100, 200 })));
ASSERT_NO_THROW(fps.Save("data/vfr/out/v2_nolen.txt"));
EXPECT_TRUE(validate_save("data/vfr/in/v2_nolen.txt", "data/vfr/out/v2_nolen.txt"));
@ -324,7 +324,7 @@ TEST(lagi_vfr, save_vfr_nolen) {
TEST(lagi_vfr, save_vfr_len) {
Framerate fps;
ASSERT_NO_THROW(fps = Framerate({ 0, 100, 200 }));
ASSERT_NO_THROW(fps = Framerate(std::initializer_list<int>({ 0, 100, 200 })));
ASSERT_NO_THROW(fps.Save("data/vfr/out/v2_len_3_10.txt", 10));
EXPECT_TRUE(validate_save("data/vfr/in/v2_len_3_10.txt", "data/vfr/out/v2_len_3_10.txt", 3));