Visual Studio 2012 compilation fixes

VS11 only defines pseudo-variadic template stuff for up to 5 arguments,
so use lambdas rather than bind.
This commit is contained in:
Thomas Goyne 2012-11-01 09:07:38 -07:00
parent f3d32c6726
commit 1531ef88bd
3 changed files with 3 additions and 3 deletions

View file

@ -743,7 +743,7 @@ namespace Automation4 {
{ {
bool failed = false; bool failed = false;
BackgroundScriptRunner bsr(parent, title); BackgroundScriptRunner bsr(parent, title);
bsr.Run(std::bind(lua_threaded_call, std::placeholders::_1, L, nargs, nresults, can_open_config, &failed)); bsr.Run([&](ProgressSink *ps) { lua_threaded_call(ps, L, nargs, nresults, can_open_config, &failed); });
if (failed) if (failed)
throw agi::UserCancelException("Script threw an error"); throw agi::UserCancelException("Script threw an error");
} }

View file

@ -85,7 +85,7 @@ class FontsCollectorThread : public wxThread {
#else #else
AppendText(_("Aegisub was built without any font file listers enabled"), 2); AppendText(_("Aegisub was built without any font file listers enabled"), 2);
struct DummyLister : public FontFileLister { struct DummyLister : public FontFileLister {
std::vector<wxString> GetFontPaths(wxString const&, int, bool, std::set<wxUniChar> const&) { return std::vector<wxString>(); } CollectionResult GetFontPaths(wxString const&, int, bool, std::set<wxUniChar> const&) { return CollectionResult(); }
} lister; } lister;
#endif #endif
std::vector<wxString> paths = FontCollector(callback, lister).GetFontPaths(subs); std::vector<wxString> paths = FontCollector(callback, lister).GetFontPaths(subs);

View file

@ -220,7 +220,7 @@ void MatroskaWrapper::GetSubtitles(wxString const& filename, AssFile *target) {
// Progress bar // Progress bar
double totalTime = double(segInfo->Duration) / timecodeScale; double totalTime = double(segInfo->Duration) / timecodeScale;
DialogProgress progress(NULL, _("Parsing Matroska"), _("Reading subtitles from Matroska file.")); DialogProgress progress(NULL, _("Parsing Matroska"), _("Reading subtitles from Matroska file."));
progress.Run(std::bind(read_subtitles, std::placeholders::_1, file, &input, srt, totalTime, &parser)); progress.Run([&](agi::ProgressSink *ps) { read_subtitles(ps, file, &input, srt, totalTime, &parser); });
} }
catch (...) { catch (...) {
mkv_Close(file); mkv_Close(file);