summarylogtreecommitdiffstats
path: root/0001-Fix-for-boost-1.81.0.patch
blob: ac264bc70676566278b459cc1900231d2a46d9b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
diff --git a/libaegisub/include/libaegisub/lua/utils.h b/libaegisub/include/libaegisub/lua/utils.h
index c5a65d6e4..f4921d582 100644
--- a/libaegisub/include/libaegisub/lua/utils.h
+++ b/libaegisub/include/libaegisub/lua/utils.h
@@ -87,7 +87,10 @@ int exception_wrapper(lua_State *L) {
 
 template<typename T>
 void set_field(lua_State *L, const char *name, T value) {
-	push_value(L, value);
+	if constexpr(std::is_convertible<T, std::string>::value)
+            push_value(L, static_cast<std::string>(value));
+	else
+            push_value(L, value);
 	lua_setfield(L, -2, name);
 }
 
diff --git a/src/auto4_lua.cpp b/src/auto4_lua.cpp
index 245689679..6d479b2c3 100644
--- a/src/auto4_lua.cpp
+++ b/src/auto4_lua.cpp
@@ -115,7 +115,8 @@ namespace {
 	int get_translation(lua_State *L)
 	{
 		wxString str(check_wxstring(L, 1));
-		push_value(L, _(str).utf8_str());
+		const char* val = static_cast<const char*>( _(str).utf8_str());
+		push_value(L, val);
 		return 1;
 	}
 
diff --git a/src/command/video.cpp b/src/command/video.cpp
index fb2bcb0ba..77e3e9ca7 100644
--- a/src/command/video.cpp
+++ b/src/command/video.cpp
@@ -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 = static_cast<const char*>(wxGetHomeDir().c_str());
 		}
 	}
 	// Actual fixed (possibly relative) path, decode it
diff --git a/src/dialog_attachments.cpp b/src/dialog_attachments.cpp
index 38ff53027..e30339f81 100644
--- a/src/dialog_attachments.cpp
+++ b/src/dialog_attachments.cpp
@@ -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 = static_cast<const char*>(wxDirSelector(_("Select the path to save the files to:"), to_wx(OPT_GET("Path/Fonts Collector Destination")->GetString())).c_str());
 	else {
 		path = SaveFileSelector(
 			_("Select the path to save the file to:"),