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;
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)
throw agi::UserCancelException("Script threw an error");
}

View file

@ -85,7 +85,7 @@ class FontsCollectorThread : public wxThread {
#else
AppendText(_("Aegisub was built without any font file listers enabled"), 2);
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;
#endif
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
double totalTime = double(segInfo->Duration) / timecodeScale;
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 (...) {
mkv_Close(file);