]>
Commit | Line | Data |
---|---|---|
456c2089 JR |
1 | Index: Aegisub-3.3.2/src/command/video.cpp |
2 | =================================================================== | |
3 | --- Aegisub-3.3.2.orig/src/command/video.cpp | |
4 | +++ Aegisub-3.3.2/src/command/video.cpp | |
5 | @@ -475,7 +475,7 @@ static void save_snapshot(agi::Context * | |
6 | // If where ever that is isn't defined, we can't save there | |
7 | if ((basepath == "\\") || (basepath == "/")) { | |
8 | // So save to the current user's home dir instead | |
9 | - basepath = wxGetHomeDir().c_str(); | |
10 | + basepath = static_cast<const char *>(wxGetHomeDir().c_str()); | |
11 | } | |
12 | } | |
13 | // Actual fixed (possibly relative) path, decode it | |
14 | Index: Aegisub-3.3.2/src/dialog_attachments.cpp | |
15 | =================================================================== | |
16 | --- Aegisub-3.3.2.orig/src/dialog_attachments.cpp | |
17 | +++ Aegisub-3.3.2/src/dialog_attachments.cpp | |
18 | @@ -161,7 +161,7 @@ void DialogAttachments::OnExtract(wxComm | |
19 | ||
20 | // Multiple or single? | |
21 | if (listView->GetNextSelected(i) != -1) | |
22 | - path = wxDirSelector(_("Select the path to save the files to:"), to_wx(OPT_GET("Path/Fonts Collector Destination")->GetString())).c_str(); | |
23 | + 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()); | |
24 | else { | |
25 | path = SaveFileSelector( | |
26 | _("Select the path to save the file to:"), | |
27 | Index: Aegisub-3.3.2/libaegisub/include/libaegisub/lua/utils.h | |
28 | =================================================================== | |
29 | --- Aegisub-3.3.2.orig/libaegisub/include/libaegisub/lua/utils.h | |
30 | +++ Aegisub-3.3.2/libaegisub/include/libaegisub/lua/utils.h | |
31 | @@ -27,6 +27,7 @@ | |
32 | #include <boost/exception/detail/attribute_noreturn.hpp> | |
33 | #define BOOST_NORETURN BOOST_ATTRIBUTE_NORETURN | |
34 | #endif | |
35 | +#include <boost/flyweight.hpp> | |
36 | ||
37 | namespace agi { namespace lua { | |
38 | // Exception type for errors where the error details are on the lua stack | |
39 | @@ -91,6 +92,13 @@ void set_field(lua_State *L, const char | |
40 | lua_setfield(L, -2, name); | |
41 | } | |
42 | ||
43 | +template<> | |
44 | +inline void set_field(lua_State *L, const char *name, | |
45 | + boost::flyweights::flyweight<std::string> value) { | |
46 | + push_value(L, value.get()); | |
47 | + lua_setfield(L, -2, name); | |
48 | +} | |
49 | + | |
50 | template<int (*func)(lua_State *L)> | |
51 | void set_field(lua_State *L, const char *name) { | |
52 | push_value(L, exception_wrapper<func>); | |
53 | Index: Aegisub-3.3.2/src/auto4_lua.cpp | |
54 | =================================================================== | |
55 | --- Aegisub-3.3.2.orig/src/auto4_lua.cpp | |
56 | +++ Aegisub-3.3.2/src/auto4_lua.cpp | |
57 | @@ -119,7 +119,7 @@ namespace { | |
58 | int get_translation(lua_State *L) | |
59 | { | |
60 | wxString str(check_wxstring(L, 1)); | |
61 | - push_value(L, _(str).utf8_str()); | |
62 | + push_value(L, static_cast<const char *>(_(str).utf8_str())); | |
63 | return 1; | |
64 | } | |
65 |