From 1531ef88bd97e38b903736930ced5b705b6e7224 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Thu, 1 Nov 2012 09:07:38 -0700 Subject: [PATCH] Visual Studio 2012 compilation fixes VS11 only defines pseudo-variadic template stuff for up to 5 arguments, so use lambdas rather than bind. --- aegisub/src/auto4_lua.cpp | 2 +- aegisub/src/dialog_fonts_collector.cpp | 2 +- aegisub/src/mkv_wrap.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/aegisub/src/auto4_lua.cpp b/aegisub/src/auto4_lua.cpp index af218df0b..61a5efbf9 100644 --- a/aegisub/src/auto4_lua.cpp +++ b/aegisub/src/auto4_lua.cpp @@ -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"); } diff --git a/aegisub/src/dialog_fonts_collector.cpp b/aegisub/src/dialog_fonts_collector.cpp index 75208a0b2..74a9a5fab 100644 --- a/aegisub/src/dialog_fonts_collector.cpp +++ b/aegisub/src/dialog_fonts_collector.cpp @@ -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 GetFontPaths(wxString const&, int, bool, std::set const&) { return std::vector(); } + CollectionResult GetFontPaths(wxString const&, int, bool, std::set const&) { return CollectionResult(); } } lister; #endif std::vector paths = FontCollector(callback, lister).GetFontPaths(subs); diff --git a/aegisub/src/mkv_wrap.cpp b/aegisub/src/mkv_wrap.cpp index 76a1c0757..17cd9904f 100644 --- a/aegisub/src/mkv_wrap.cpp +++ b/aegisub/src/mkv_wrap.cpp @@ -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);