void-packages/srcpkgs/Aegisub/patches/boost181.patch

66 lines
2.6 KiB
Diff
Raw Normal View History

2022-11-29 02:37:35 +01:00
Index: Aegisub-3.3.2/src/command/video.cpp
===================================================================
--- Aegisub-3.3.2.orig/src/command/video.cpp
+++ Aegisub-3.3.2/src/command/video.cpp
@@ -475,7 +475,7 @@ static void save_snapshot(agi::Context *
// 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
Index: Aegisub-3.3.2/src/dialog_attachments.cpp
===================================================================
--- Aegisub-3.3.2.orig/src/dialog_attachments.cpp
+++ Aegisub-3.3.2/src/dialog_attachments.cpp
@@ -161,7 +161,7 @@ void DialogAttachments::OnExtract(wxComm
// 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:"),
Index: Aegisub-3.3.2/libaegisub/include/libaegisub/lua/utils.h
===================================================================
--- Aegisub-3.3.2.orig/libaegisub/include/libaegisub/lua/utils.h
+++ Aegisub-3.3.2/libaegisub/include/libaegisub/lua/utils.h
@@ -27,6 +27,7 @@
#include <boost/exception/detail/attribute_noreturn.hpp>
#define BOOST_NORETURN BOOST_ATTRIBUTE_NORETURN
#endif
+#include <boost/flyweight.hpp>
namespace agi { namespace lua {
// Exception type for errors where the error details are on the lua stack
@@ -91,6 +92,13 @@ void set_field(lua_State *L, const char
lua_setfield(L, -2, name);
}
+template<>
+inline void set_field(lua_State *L, const char *name,
+ boost::flyweights::flyweight<std::string> value) {
+ push_value(L, value.get());
+ lua_setfield(L, -2, name);
+}
+
template<int (*func)(lua_State *L)>
void set_field(lua_State *L, const char *name) {
push_value(L, exception_wrapper<func>);
Index: Aegisub-3.3.2/src/auto4_lua.cpp
===================================================================
--- Aegisub-3.3.2.orig/src/auto4_lua.cpp
+++ Aegisub-3.3.2/src/auto4_lua.cpp
@@ -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, static_cast<const char *>(_(str).utf8_str()));
return 1;
}