Remove references to tr1

This commit is contained in:
Thomas Goyne 2012-09-24 16:35:27 -07:00
parent 4500edef39
commit 0893ed3f0a
71 changed files with 180 additions and 223 deletions

View File

@ -22,12 +22,7 @@
#include <algorithm>
#include <cmath>
#include <memory>
#endif
#ifdef _WIN32
#include <tuple>
#else
#include <tr1/tuple>
#endif
#include "libaegisub/hotkey.h"
@ -98,7 +93,7 @@ std::string Hotkey::Scan(const std::string &context, const std::string &str, boo
std::string local, dfault;
HotkeyMap::const_iterator index, end;
for (std::tr1::tie(index, end) = str_map.equal_range(str); index != end; ++index) {
for (std::tie(index, end) = str_map.equal_range(str); index != end; ++index) {
std::string const& ctext = index->second.Context();
if (always && ctext == "Always") {
@ -127,7 +122,7 @@ std::vector<std::string> Hotkey::GetHotkeys(const std::string &context, const st
std::vector<std::string> ret;
HotkeyMap::const_iterator it, end;
for (std::tr1::tie(it, end) = cmd_map.equal_range(command); it != end; ++it) {
for (std::tie(it, end) = cmd_map.equal_range(command); it != end; ++it) {
std::string ctext = it->second.Context();
if (ctext == "Always" || ctext == "Default" || ctext == context)
ret.push_back(it->second.StrMenu());
@ -142,7 +137,7 @@ std::vector<std::string> Hotkey::GetHotkeys(const std::string &context, const st
std::string Hotkey::GetHotkey(const std::string &context, const std::string &command) const {
std::string ret;
HotkeyMap::const_iterator it, end;
for (std::tr1::tie(it, end) = cmd_map.equal_range(command); it != end; ++it) {
for (std::tie(it, end) = cmd_map.equal_range(command); it != end; ++it) {
std::string ctext = it->second.Context();
if (ctext == context) return it->second.StrMenu();
if (ctext == "Default")

View File

@ -19,14 +19,9 @@
#pragma once
#ifndef LAGI_PRE
#include <stdint.h>
#include <string>
#ifdef _WIN32
#include <cstdint>
#include <functional>
#else
#include <tr1/functional>
#endif
#include <string>
#endif
namespace agi {
@ -82,6 +77,6 @@ namespace agi {
/// Progress updates sent to the progress sink passed to the task should
/// be displayed to the user in some way, along with some way for the
/// user to cancel the task.
virtual void Run(std::tr1::function<void(ProgressSink *)> task, int priority=-1)=0;
virtual void Run(std::function<void(ProgressSink *)> task, int priority=-1)=0;
};
}

View File

@ -34,12 +34,8 @@
#pragma once
#include <string>
#ifdef _WIN32
#include <memory>
#else
#include <tr1/memory>
#endif
#include <string>
/// @see aegisub.h
namespace agi {
@ -99,7 +95,7 @@ namespace agi {
std::string message;
/// An inner exception, the cause of this exception
std::tr1::shared_ptr<Exception> inner;
std::shared_ptr<Exception> inner;
protected:

View File

@ -20,11 +20,7 @@
#ifndef LAGI_PRE
#include <iterator>
#ifdef _WIN32
#include <memory>
#else
#include <tr1/memory>
#endif
#include <sstream>
#include <stdint.h>
@ -42,7 +38,7 @@ class line_iterator : public std::iterator<std::input_iterator_tag, OutputType>
bool valid; ///< Are there any more values to read?
OutputType value; ///< Value to return when this is dereference
std::string encoding; ///< Encoding of source stream
std::tr1::shared_ptr<agi::charset::IconvWrapper> conv;
std::shared_ptr<agi::charset::IconvWrapper> conv;
int cr; ///< CR character in the source encoding
int lf; ///< LF character in the source encoding
size_t width; ///< width of LF character in the source encoding

View File

@ -21,19 +21,14 @@
#ifndef LAGI_PRE
#include <boost/container/map.hpp>
#ifdef _WIN32
#include <functional>
#include <memory>
#else
#include <tr1/functional>
#include <tr1/memory>
#endif
#endif
namespace agi {
namespace signal {
using namespace std::tr1::placeholders;
using namespace std::placeholders;
class Connection;
@ -59,7 +54,7 @@ namespace detail {
/// @class Connection
/// @brief Object representing a connection to a signal
class Connection {
std::tr1::shared_ptr<detail::ConnectionToken> token;
std::shared_ptr<detail::ConnectionToken> token;
public:
Connection() { }
Connection(detail::ConnectionToken *token) : token(token) { token->claimed = true; }
@ -167,15 +162,15 @@ namespace detail {
}
template<class F, class Arg1>
UnscopedConnection Connect(F func, Arg1 a1) {
return Connect(std::tr1::bind(func, a1));
return Connect(std::bind(func, a1));
}
template<class F, class Arg1, class Arg2>
UnscopedConnection Connect(F func, Arg1 a1, Arg2 a2) {
return Connect(std::tr1::bind(func, a1, a2));
return Connect(std::bind(func, a1, a2));
}
template<class F, class Arg1, class Arg2, class Arg3>
UnscopedConnection Connect(F func, Arg1 a1, Arg2 a2, Arg3 a3) {
return Connect(std::tr1::bind(func, a1, a2, a3));
return Connect(std::bind(func, a1, a2, a3));
}
};
}
@ -193,8 +188,8 @@ namespace detail {
/// @param Arg1 Type of first argument to pass to slots
/// @param Arg2 Type of second argument to pass to slots
template<class Arg1 = void, class Arg2 = void>
class Signal : public detail::SignalBaseImpl<std::tr1::function<void (Arg1, Arg2)> > {
typedef detail::SignalBaseImpl<std::tr1::function<void (Arg1, Arg2)> > super;
class Signal : public detail::SignalBaseImpl<std::function<void (Arg1, Arg2)> > {
typedef detail::SignalBaseImpl<std::function<void (Arg1, Arg2)> > super;
using super::Blocked;
using super::slots;
public:
@ -220,7 +215,7 @@ public:
/// sig.Connect(&Class::Foo, this, _1, _2)
template<class T>
UnscopedConnection Connect(void (T::*func)(Arg1, Arg2), T* a1) {
return Connect(std::tr1::bind(func, a1, _1, _2));
return Connect(std::bind(func, a1, _1, _2));
}
};
@ -228,8 +223,8 @@ public:
/// @brief One-argument signal
/// @param Arg1 Type of the argument to pass to slots
template<class Arg1>
class Signal<Arg1, void> : public detail::SignalBaseImpl<std::tr1::function<void (Arg1)> > {
typedef detail::SignalBaseImpl<std::tr1::function<void (Arg1)> > super;
class Signal<Arg1, void> : public detail::SignalBaseImpl<std::function<void (Arg1)> > {
typedef detail::SignalBaseImpl<std::function<void (Arg1)> > super;
using super::Blocked;
using super::slots;
public:
@ -253,15 +248,15 @@ public:
/// sig.Connect(&Class::Foo, this) rather than sig.Connect(&Class::Foo, this, _1)
template<class T>
UnscopedConnection Connect(void (T::*func)(Arg1), T* a1) {
return Connect(std::tr1::bind(func, a1, _1));
return Connect(std::bind(func, a1, _1));
}
};
/// @class Signal
/// @brief Zero-argument signal
template<>
class Signal<void> : public detail::SignalBaseImpl<std::tr1::function<void ()> > {
typedef detail::SignalBaseImpl<std::tr1::function<void ()> > super;
class Signal<void> : public detail::SignalBaseImpl<std::function<void ()> > {
typedef detail::SignalBaseImpl<std::function<void ()> > super;
using super::Blocked;
using super::slots;
public:

View File

@ -33,26 +33,22 @@
#include <algorithm>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <numeric>
#include <set>
#include <sstream>
#include <stdexcept>
#include <string>
#include <tuple>
#include <vector>
#ifdef _WIN32
#include <functional>
#include <memory>
#else
#include <tr1/functional>
#include <tr1/memory>
#endif
// Boost
#include <boost/container/list.hpp>

View File

@ -53,12 +53,7 @@
#define AGI_PRE
// General headers
#ifdef _WIN32
#include <array>
#else
#include <tr1/array>
#endif
#include <clocale>
#include <cstdlib>
#include <cctype>

View File

@ -33,7 +33,7 @@
///
#ifndef AGI_PRE
#include <tr1/memory>
#include <memory>
#include <vector>
#endif
@ -43,7 +43,7 @@
/// @brief DOCME
class AssAttachment : public AssEntry {
/// Decoded file data
std::tr1::shared_ptr<std::vector<char> > data;
std::shared_ptr<std::vector<char> > data;
/// Encoded data which has been read from the script but not yet decoded
wxString buffer;

View File

@ -33,7 +33,7 @@
///
#ifndef AGI_PRE
#include <tr1/array>
#include <array>
#include <wx/colour.h>
#endif
@ -66,7 +66,7 @@ public:
double outline_w; ///< Outline width in pixels
double shadow_w; ///< Shadow distance in pixels
int alignment; ///< \an-style line alignment
std::tr1::array<int, 3> Margin; ///< Left/Right/Vertical
std::array<int, 3> Margin; ///< Left/Right/Vertical
int encoding; ///< ASS font encoding needed for some non-unicode fonts
/// Update the raw line data after one or more of the public members have been changed

View File

@ -37,7 +37,7 @@
#include "ass_style_storage.h"
#ifndef AGI_PRE
#include <tr1/functional>
#include <functional>
#endif
#include "ass_style.h"

View File

@ -74,7 +74,7 @@ AudioKaraoke::AudioKaraoke(wxWindow *parent, agi::Context *c)
, click_will_remove_split(false)
, enabled(false)
{
using std::tr1::bind;
using std::bind;
cancel_button = new wxBitmapButton(this, -1, GETIMAGE(kara_split_cancel_16));
cancel_button->SetToolTip(_("Discard all uncommitted splits"));
@ -241,7 +241,7 @@ void AudioKaraoke::RenderText() {
void AudioKaraoke::AddMenuItem(wxMenu &menu, wxString const& tag, wxString const& help, wxString const& selected) {
wxMenuItem *item = menu.AppendCheckItem(-1, tag, help);
menu.Bind(wxEVT_COMMAND_MENU_SELECTED, std::tr1::bind(&AudioKaraoke::SetTagType, this, tag), item->GetId());
menu.Bind(wxEVT_COMMAND_MENU_SELECTED, std::bind(&AudioKaraoke::SetTagType, this, tag), item->GetId());
item->Check(tag == selected);
}

View File

@ -123,7 +123,7 @@ HDAudioProvider::HDAudioProvider(AudioProvider *src, agi::BackgroundRunner *br)
try {
{
agi::io::Save out(STD_STR(diskCacheFilename), true);
br->Run(bind(&HDAudioProvider::FillCache, this, src, &out.Get(), std::tr1::placeholders::_1));
br->Run(bind(&HDAudioProvider::FillCache, this, src, &out.Get(), std::placeholders::_1));
}
cache_provider.reset(new RawAudioProvider(diskCacheFilename, src));
}

View File

@ -78,7 +78,7 @@ RAMAudioProvider::RAMAudioProvider(AudioProvider *src, agi::BackgroundRunner *br
filename = source->GetFilename();
float_samples = source->AreSamplesFloat();
br->Run(std::tr1::bind(&RAMAudioProvider::FillCache, this, src, std::tr1::placeholders::_1));
br->Run(std::bind(&RAMAudioProvider::FillCache, this, src, std::placeholders::_1));
}
RAMAudioProvider::~RAMAudioProvider() {

View File

@ -39,7 +39,7 @@
#ifndef AGI_PRE
#include <algorithm>
#include <tr1/functional>
#include <functional>
#include <wx/bitmap.h>
#include <wx/dcmemory.h>
@ -52,7 +52,7 @@ template<class C, class F> static void for_each(C &container, F const& func)
std::for_each(container.begin(), container.end(), func);
}
using std::tr1::placeholders::_1;
using std::placeholders::_1;
AudioRendererBitmapCacheBitmapFactory::AudioRendererBitmapCacheBitmapFactory(AudioRenderer *renderer)
: renderer(renderer)
@ -182,7 +182,7 @@ void AudioRenderer::ResetBlockCount()
double duration = provider->GetNumSamples() * 1000.0 / provider->GetSampleRate();
size_t rendered_width = (size_t)ceil(duration / pixel_ms);
cache_numblocks = rendered_width / cache_bitmap_width;
for_each(bitmaps, bind(&AudioRendererBitmapCache::SetBlockCount, _1, cache_numblocks));
for_each(bitmaps, std::bind(&AudioRendererBitmapCache::SetBlockCount, _1, cache_numblocks));
}
}
@ -253,7 +253,7 @@ void AudioRenderer::Render(wxDC &dc, wxPoint origin, int start, int length, Audi
void AudioRenderer::Invalidate()
{
for_each(bitmaps, bind(&AudioRendererBitmapCache::Age, _1, 0));
for_each(bitmaps, std::bind(&AudioRendererBitmapCache::Age, _1, 0));
needs_age = false;
}

View File

@ -435,9 +435,9 @@ AudioTimingControllerDialogue::AudioTimingControllerDialogue(agi::Context *c)
, active_line_connection(c->selectionController->AddActiveLineListener(&AudioTimingControllerDialogue::OnActiveLineChanged, this))
, selection_connection(c->selectionController->AddSelectionListener(&AudioTimingControllerDialogue::OnSelectedSetChanged, this))
{
keyframes_provider.AddMarkerMovedListener(std::tr1::bind(std::tr1::ref(AnnounceMarkerMoved)));
video_position_provider.AddMarkerMovedListener(std::tr1::bind(std::tr1::ref(AnnounceMarkerMoved)));
seconds_provider.AddMarkerMovedListener(std::tr1::bind(std::tr1::ref(AnnounceMarkerMoved)));
keyframes_provider.AddMarkerMovedListener(std::bind(std::ref(AnnounceMarkerMoved)));
video_position_provider.AddMarkerMovedListener(std::bind(std::ref(AnnounceMarkerMoved)));
seconds_provider.AddMarkerMovedListener(std::bind(std::ref(AnnounceMarkerMoved)));
Revert();
}
@ -502,9 +502,9 @@ void AudioTimingControllerDialogue::GetRenderingStyles(AudioRenderingStyleRanges
{
active_line.GetStyleRange(&ranges);
for_each(selected_lines.begin(), selected_lines.end(),
bind(&TimeableLine::GetStyleRange, std::tr1::placeholders::_1, &ranges));
std::bind(&TimeableLine::GetStyleRange, std::placeholders::_1, &ranges));
for_each(inactive_lines.begin(), inactive_lines.end(),
bind(&TimeableLine::GetStyleRange, std::tr1::placeholders::_1, &ranges));
std::bind(&TimeableLine::GetStyleRange, std::placeholders::_1, &ranges));
}
void AudioTimingControllerDialogue::Next(NextMode mode)
@ -547,7 +547,7 @@ void AudioTimingControllerDialogue::DoCommit(bool user_triggered)
if (modified_lines.size())
{
for_each(modified_lines.begin(), modified_lines.end(),
std::tr1::mem_fn(&TimeableLine::Apply));
std::mem_fn(&TimeableLine::Apply));
commit_connection.Block();
if (user_triggered)
@ -824,9 +824,9 @@ void AudioTimingControllerDialogue::RegenerateMarkers()
active_line.GetMarkers(&markers);
for_each(selected_lines.begin(), selected_lines.end(),
bind(&TimeableLine::GetMarkers, std::tr1::placeholders::_1, &markers));
std::bind(&TimeableLine::GetMarkers, std::placeholders::_1, &markers));
for_each(inactive_lines.begin(), inactive_lines.end(),
bind(&TimeableLine::GetMarkers, std::tr1::placeholders::_1, &markers));
std::bind(&TimeableLine::GetMarkers, std::placeholders::_1, &markers));
sort(markers.begin(), markers.end(), marker_ptr_cmp());
AnnounceMarkerMoved();
@ -838,7 +838,7 @@ std::vector<AudioMarker*> AudioTimingControllerDialogue::GetLeftMarkers()
ret.reserve(selected_lines.size() + 1);
ret.push_back(active_line.GetLeftMarker());
transform(selected_lines.begin(), selected_lines.end(), back_inserter(ret),
bind(&TimeableLine::GetLeftMarker, std::tr1::placeholders::_1));
std::bind(&TimeableLine::GetLeftMarker, std::placeholders::_1));
return ret;
}
@ -848,7 +848,7 @@ std::vector<AudioMarker*> AudioTimingControllerDialogue::GetRightMarkers()
ret.reserve(selected_lines.size() + 1);
ret.push_back(active_line.GetRightMarker());
transform(selected_lines.begin(), selected_lines.end(), back_inserter(ret),
bind(&TimeableLine::GetRightMarker, std::tr1::placeholders::_1));
std::bind(&TimeableLine::GetRightMarker, std::placeholders::_1));
return ret;
}

View File

@ -171,8 +171,8 @@ AudioTimingControllerKaraoke::AudioTimingControllerKaraoke(agi::Context *c, AssK
slots.push_back(kara->AddSyllablesChangedListener(&AudioTimingControllerKaraoke::Revert, this));
slots.push_back(OPT_SUB("Audio/Auto/Commit", &AudioTimingControllerKaraoke::OnAutoCommitChange, this));
keyframes_provider.AddMarkerMovedListener(std::tr1::bind(std::tr1::ref(AnnounceMarkerMoved)));
video_position_provider.AddMarkerMovedListener(std::tr1::bind(std::tr1::ref(AnnounceMarkerMoved)));
keyframes_provider.AddMarkerMovedListener(std::bind(std::ref(AnnounceMarkerMoved)));
video_position_provider.AddMarkerMovedListener(std::bind(std::ref(AnnounceMarkerMoved)));
Revert();

View File

@ -39,6 +39,8 @@
#ifndef AGI_PRE
#ifdef __WINDOWS__
#include <tchar.h>
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#endif
#include <wx/button.h>
@ -50,14 +52,8 @@
#include <wx/msgdlg.h>
#include <wx/thread.h>
#include <wx/tokenzr.h>
#endif
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <tuple>
#else
#include <tr1/tuple>
#endif
#ifndef __WINDOWS__
@ -251,7 +247,7 @@ namespace Automation4 {
int ret = 0;
wxSemaphore sema(0, 1);
wxThreadEvent *evt = new wxThreadEvent(EVT_SHOW_DIALOG);
evt->SetPayload(std::tr1::make_tuple(dialog, &sema, &ret));
evt->SetPayload(std::make_tuple(dialog, &sema, &ret));
bsr->QueueEvent(evt);
sema.Wait();
return ret;
@ -288,7 +284,7 @@ namespace Automation4 {
void BackgroundScriptRunner::OnDialog(wxThreadEvent &evt)
{
using namespace std::tr1;
using namespace std;
tuple<wxDialog*, wxSemaphore*, int*> payload = evt.GetPayload<tuple<wxDialog*, wxSemaphore*, int*> >();
*get<2>(payload) = get<0>(payload)->ShowModal();
get<1>(payload)->Post();
@ -301,13 +297,13 @@ namespace Automation4 {
// Convert a function taking an Automation4::ProgressSink to one taking an
// agi::ProgressSink so that we can pass it to an agi::BackgroundWorker
static void progress_sink_wrapper(std::tr1::function<void (ProgressSink*)> task, agi::ProgressSink *ps, BackgroundScriptRunner *bsr)
static void progress_sink_wrapper(std::function<void (ProgressSink*)> task, agi::ProgressSink *ps, BackgroundScriptRunner *bsr)
{
ProgressSink aps(ps, bsr);
task(&aps);
}
void BackgroundScriptRunner::Run(std::tr1::function<void (ProgressSink*)> task)
void BackgroundScriptRunner::Run(std::function<void (ProgressSink*)> task)
{
int prio = OPT_GET("Automation/Thread Priority")->GetInt();
if (prio == 0) prio = 50; // normal
@ -315,7 +311,7 @@ namespace Automation4 {
else if (prio == 2) prio = 10; // lowest
else prio = 50; // fallback normal
impl->Run(bind(progress_sink_wrapper, task, std::tr1::placeholders::_1, this), prio);
impl->Run(bind(progress_sink_wrapper, task, std::placeholders::_1, this), prio);
}
wxWindow *BackgroundScriptRunner::GetParentWindow() const
@ -574,10 +570,10 @@ namespace Automation4 {
bool ScriptFactory::CanHandleScriptFormat(wxString const& filename)
{
using std::tr1::placeholders::_1;
using std::placeholders::_1;
// Just make this always return true to bitch about unknown script formats in autoload
return find_if(Factories().begin(), Factories().end(),
bind(&wxString::Matches, filename, bind(&ScriptFactory::GetFilenamePattern, _1))) != Factories().end();
[&](ScriptFactory *sf) { return filename.Matches(sf->GetFilenamePattern()); }) != Factories().end();
}
std::vector<ScriptFactory*>& ScriptFactory::Factories()

View File

@ -130,7 +130,7 @@ namespace Automation4 {
void QueueEvent(wxEvent *evt);
wxWindow *GetParentWindow() const;
void Run(std::tr1::function<void(ProgressSink*)> task);
void Run(std::function<void(ProgressSink*)> task);
BackgroundScriptRunner(wxWindow *parent, wxString const& title);
~BackgroundScriptRunner();

View File

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

View File

@ -95,7 +95,7 @@ BaseGrid::BaseGrid(wxWindow* parent, agi::Context *context, const wxSize& size,
, active_line(0)
, batch_level(0)
, batch_active_line_changed(false)
, seek_listener(context->videoController->AddSeekListener(std::tr1::bind(&BaseGrid::Refresh, this, false, (wxRect*)NULL)))
, seek_listener(context->videoController->AddSeekListener(std::bind(&BaseGrid::Refresh, this, false, (wxRect*)NULL)))
, context_menu(0)
, yPos(0)
, context(context)
@ -132,7 +132,7 @@ BaseGrid::BaseGrid(wxWindow* parent, agi::Context *context, const wxSize& size,
OPT_SUB("Colour/Subtitle Grid/Lines", &BaseGrid::UpdateStyle, this);
OPT_SUB("Colour/Subtitle Grid/Selection", &BaseGrid::UpdateStyle, this);
OPT_SUB("Colour/Subtitle Grid/Standard", &BaseGrid::UpdateStyle, this);
OPT_SUB("Subtitle/Grid/Hide Overrides", std::tr1::bind(&BaseGrid::Refresh, this, false, (wxRect*)NULL));
OPT_SUB("Subtitle/Grid/Hide Overrides", std::bind(&BaseGrid::Refresh, this, false, (wxRect*)NULL));
Bind(wxEVT_CONTEXT_MENU, &BaseGrid::OnContextMenu, this);
}
@ -272,7 +272,7 @@ void BaseGrid::UpdateMaps(bool preserve_selected_rows) {
if (preserve_selected_rows) {
sel_rows.reserve(selection.size());
transform(selection.begin(), selection.end(), back_inserter(sel_rows),
bind1st(std::mem_fun(&BaseGrid::GetDialogueIndex), this));
std::bind(&BaseGrid::GetDialogueIndex, this));
}
index_line_map.clear();
@ -426,7 +426,7 @@ wxArrayInt BaseGrid::GetSelection() const {
wxArrayInt res;
res.reserve(selection.size());
transform(selection.begin(), selection.end(), std::back_inserter(res),
bind(&BaseGrid::GetDialogueIndex, this, std::tr1::placeholders::_1));
std::bind(&BaseGrid::GetDialogueIndex, this, std::placeholders::_1));
std::sort(res.begin(), res.end());
return res;
}
@ -784,7 +784,6 @@ void BaseGrid::OnContextMenu(wxContextMenuEvent &evt) {
}
void BaseGrid::ScrollTo(int y) {
int h = GetClientSize().GetHeight();
int nextY = mid(0, y, GetRows() - 1);
if (yPos != nextY) {
yPos = nextY;

View File

@ -274,7 +274,7 @@ void set_text(AssDialogue *line, wxString const& value) {
void commit_text(agi::Context const * const c, wxString const& desc, int sel_start = -1, int sel_end = -1, int *commit_id = 0) {
SubtitleSelection const& sel = c->selectionController->GetSelectedSet();
for_each(sel.begin(), sel.end(),
bind(set_text, std::tr1::placeholders::_1, c->selectionController->GetActiveLine()->Text));
std::bind(set_text, std::placeholders::_1, c->selectionController->GetActiveLine()->Text));
int new_commit_id = c->ass->Commit(desc, AssFile::COMMIT_DIAG_TEXT, commit_id ? *commit_id : -1, sel.size() == 1 ? *sel.begin() : 0);
if (commit_id)
*commit_id = new_commit_id;
@ -322,7 +322,7 @@ void show_color_picker(const agi::Context *c, agi::Color (AssStyle::*field), con
color = get_value(*line, blockn, color, tag, alt);
int commit_id = -1;
bool ok = GetColorFromUser(c->parent, color, bind(got_color, c, tag, &commit_id, std::tr1::placeholders::_1));
bool ok = GetColorFromUser(c->parent, color, std::bind(got_color, c, tag, &commit_id, std::placeholders::_1));
line->ClearBlocks();
commit_text(c, _("set color"), -1, -1, &commit_id);

View File

@ -57,7 +57,7 @@
#include "main.h"
#include "subtitle_format.h"
using std::tr1::placeholders::_1;
using std::placeholders::_1;
DialogAutomation::DialogAutomation(agi::Context *c)
: wxDialog(c->parent, -1, _("Automation Manager"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
@ -78,8 +78,8 @@ DialogAutomation::DialogAutomation(agi::Context *c)
wxButton *reload_autoload_button = new wxButton(this, -1, _("Re&scan Autoload Dir"));
wxButton *close_button = new wxButton(this, wxID_CANCEL, _("&Close"));
list->Bind(wxEVT_COMMAND_LIST_ITEM_SELECTED, std::tr1::bind(&DialogAutomation::UpdateDisplay, this));
list->Bind(wxEVT_COMMAND_LIST_ITEM_DESELECTED, std::tr1::bind(&DialogAutomation::UpdateDisplay, this));
list->Bind(wxEVT_COMMAND_LIST_ITEM_SELECTED, std::bind(&DialogAutomation::UpdateDisplay, this));
list->Bind(wxEVT_COMMAND_LIST_ITEM_DESELECTED, std::bind(&DialogAutomation::UpdateDisplay, this));
add_button->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogAutomation::OnAdd, this);
remove_button->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogAutomation::OnRemove, this);
reload_button->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogAutomation::OnReload, this);

View File

@ -240,10 +240,10 @@ class DialogColorPicker : public wxDialog {
void OnMouse(wxMouseEvent &evt);
void OnCaptureLost(wxMouseCaptureLostEvent&);
std::tr1::function<void (agi::Color)> callback;
std::function<void (agi::Color)> callback;
public:
DialogColorPicker(wxWindow *parent, agi::Color initial_color, std::tr1::function<void (agi::Color)> callback);
DialogColorPicker(wxWindow *parent, agi::Color initial_color, std::function<void (agi::Color)> callback);
~DialogColorPicker();
void SetColor(agi::Color new_color);
@ -583,7 +583,7 @@ void ColorPickerScreenDropper::DropFromScreenXY(int x, int y)
Refresh(false);
}
bool GetColorFromUser(wxWindow* parent, agi::Color original, std::tr1::function<void (agi::Color)> callback)
bool GetColorFromUser(wxWindow* parent, agi::Color original, std::function<void (agi::Color)> callback)
{
DialogColorPicker dialog(parent, original, callback);
bool ok = dialog.ShowModal() == wxID_OK;
@ -605,7 +605,7 @@ static wxBitmap *make_rgb_image(int width, int offset) {
return new wxBitmap(img);
}
DialogColorPicker::DialogColorPicker(wxWindow *parent, agi::Color initial_color, std::tr1::function<void (agi::Color)> callback)
DialogColorPicker::DialogColorPicker(wxWindow *parent, agi::Color initial_color, std::function<void (agi::Color)> callback)
: wxDialog(parent, -1, _("Select Color"))
, callback(callback)
{
@ -739,7 +739,7 @@ DialogColorPicker::DialogColorPicker(wxWindow *parent, agi::Color initial_color,
SetColor(initial_color);
recent_box->Load(OPT_GET("Tool/Colour Picker/Recent Colours")->GetListColor());
using std::tr1::bind;
using std::bind;
for (int i = 0; i < 3; ++i) {
rgb_input[i]->Bind(wxEVT_COMMAND_SPINCTRL_UPDATED, bind(&DialogColorPicker::UpdateFromRGB, this, true));
rgb_input[i]->Bind(wxEVT_COMMAND_TEXT_UPDATED, bind(&DialogColorPicker::UpdateFromRGB, this, true));

View File

@ -33,7 +33,7 @@
///
#ifndef AGI_PRE
#include <tr1/functional>
#include <functional>
#endif
namespace agi { struct Color; }
@ -44,7 +44,7 @@ class wxWindow;
/// @param original Initial color to select
/// @param callback Function called whenever the selected color changes
/// @return Did the user accept the new color?
bool GetColorFromUser(wxWindow* parent, agi::Color original, std::tr1::function<void (agi::Color)> callback);
bool GetColorFromUser(wxWindow* parent, agi::Color original, std::function<void (agi::Color)> callback);
/// @brief Get a color from the user via a color picker dialog
/// @param T Class which the callback method belongs to
@ -55,5 +55,5 @@ bool GetColorFromUser(wxWindow* parent, agi::Color original, std::tr1::function<
/// @return Did the user accept the new color?
template<class T, void (T::*method)(agi::Color)>
bool GetColorFromUser(wxWindow* parent, agi::Color original, T* callbackObj) {
return GetColorFromUser(parent, original, bind(method, callbackObj, std::tr1::placeholders::_1));
return GetColorFromUser(parent, original, std::bind(method, callbackObj, std::placeholders::_1));
}

View File

@ -38,7 +38,7 @@
#include "dialog_dummy_video.h"
#ifndef AGI_PRE
#include <tr1/functional>
#include <functional>
#include <wx/checkbox.h>
#include <wx/combobox.h>
@ -181,7 +181,7 @@ DialogDummyVideo::DialogDummyVideo(wxWindow *parent)
wxStdDialogButtonSizer *btnSizer = CreateStdDialogButtonSizer(wxOK | wxCANCEL | wxHELP);
ok_button = btnSizer->GetAffirmativeButton();
btnSizer->GetHelpButton()->Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::tr1::bind(&HelpButton::OpenPage, "Dummy Video"));
btnSizer->GetHelpButton()->Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&HelpButton::OpenPage, "Dummy Video"));
main_sizer->Add(new wxStaticLine(this,wxHORIZONTAL),0,wxALL|wxEXPAND,5);
main_sizer->Add(btnSizer,0,wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND,5);

View File

@ -113,7 +113,7 @@ DialogExport::DialogExport(agi::Context *c)
wxStdDialogButtonSizer *btn_sizer = CreateStdDialogButtonSizer(wxOK | wxCANCEL | wxHELP);
btn_sizer->GetAffirmativeButton()->SetLabelText(_("Export..."));
Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogExport::OnProcess, this, wxID_OK);
Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::tr1::bind(&HelpButton::OpenPage, "Export"), wxID_HELP);
Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&HelpButton::OpenPage, "Export"), wxID_HELP);
wxSizer *horz_sizer = new wxBoxSizer(wxHORIZONTAL);
opt_sizer = new wxBoxSizer(wxVERTICAL);

View File

@ -76,7 +76,7 @@ class FontsCollectorThread : public wxThread {
FcMode oper; ///< Copying mode
void Collect() {
using namespace std::tr1::placeholders;
using namespace std::placeholders;
FontCollectorStatusCallback callback(bind(&FontsCollectorThread::AppendText, this, _1, _2));
@ -272,7 +272,7 @@ DialogFontsCollector::DialogFontsCollector(agi::Context *c)
start_btn->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogFontsCollector::OnStart, this);
dest_browse_button->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogFontsCollector::OnBrowse, this);
collection_mode->Bind(wxEVT_COMMAND_RADIOBOX_SELECTED, &DialogFontsCollector::OnRadio, this);
button_sizer->GetHelpButton()->Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::tr1::bind(&HelpButton::OpenPage, "Fonts Collector"));
button_sizer->GetHelpButton()->Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&HelpButton::OpenPage, "Fonts Collector"));
Bind(EVT_ADD_TEXT, &DialogFontsCollector::OnAddText, this);
Bind(EVT_COLLECTION_DONE, &DialogFontsCollector::OnCollectionComplete, this);
}

View File

@ -92,7 +92,7 @@ DialogJumpTo::DialogJumpTo(agi::Context *c)
Bind(wxEVT_INIT_DIALOG, &DialogJumpTo::OnInitDialog, this);
Bind(wxEVT_COMMAND_TEXT_ENTER, &DialogJumpTo::OnOK, this);
Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogJumpTo::OnOK, this, wxID_OK);
Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::tr1::bind(&DialogJumpTo::EndModal, this, 0), wxID_CANCEL);
Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&DialogJumpTo::EndModal, this, 0), wxID_CANCEL);
JumpTime->Bind(wxEVT_COMMAND_TEXT_UPDATED, &DialogJumpTo::OnEditTime, this);
JumpFrame->Bind(wxEVT_COMMAND_TEXT_UPDATED, &DialogJumpTo::OnEditFrame, this);
}

View File

@ -146,8 +146,8 @@ KaraokeLineMatchDisplay::KaraokeLineMatchDisplay(wxWindow *parent)
SetMaxSize(wxSize(-1, best_size.GetHeight()));
SetMinSize(best_size);
Bind(wxEVT_SET_FOCUS, std::tr1::bind(&wxControl::Refresh, this, true, (const wxRect*)0));
Bind(wxEVT_KILL_FOCUS, std::tr1::bind(&wxControl::Refresh, this, true, (const wxRect*)0));
Bind(wxEVT_SET_FOCUS, std::bind(&wxControl::Refresh, this, true, (const wxRect*)0));
Bind(wxEVT_KILL_FOCUS, std::bind(&wxControl::Refresh, this, true, (const wxRect*)0));
Bind(wxEVT_PAINT, &KaraokeLineMatchDisplay::OnPaint, this);
}

View File

@ -39,7 +39,7 @@
#ifndef AGI_PRE
#include <algorithm>
#include <ctime>
#include <tr1/functional>
#include <functional>
#include <string>
#include <wx/button.h>
@ -59,7 +59,7 @@ public:
: text_ctrl(t)
{
const agi::log::Sink *sink = agi::log::log->GetSink();
for_each(sink->begin(), sink->end(), bind(&EmitLog::log, this, std::tr1::placeholders::_1));
for_each(sink->begin(), sink->end(), bind(&EmitLog::log, this, std::placeholders::_1));
}
void log(agi::log::SinkMessage *sm) {

View File

@ -37,7 +37,7 @@
#include "dialog_paste_over.h"
#ifndef AGI_PRE
#include <tr1/functional>
#include <functional>
#include <wx/button.h>
#include <wx/checklst.h>
@ -82,9 +82,9 @@ DialogPasteOver::DialogPasteOver(wxWindow *parent)
wxSizer *TopButtonSizer = new wxBoxSizer(wxHORIZONTAL);
TopButtonSizer->Add(btn = new wxButton(this, -1, _("&All")), wxSizerFlags(1));
btn->Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::tr1::bind(&DialogPasteOver::CheckAll, this, true));
btn->Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&DialogPasteOver::CheckAll, this, true));
TopButtonSizer->Add(btn = new wxButton(this, -1, _("&None")), wxSizerFlags(1));
btn->Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::tr1::bind(&DialogPasteOver::CheckAll, this, false));
btn->Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&DialogPasteOver::CheckAll, this, false));
TopButtonSizer->Add(btn = new wxButton(this, -1, _("&Times")), wxSizerFlags(1));
btn->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogPasteOver::OnTimes, this);
TopButtonSizer->Add(btn = new wxButton(this, -1, _("T&ext")), wxSizerFlags(1));
@ -93,7 +93,7 @@ DialogPasteOver::DialogPasteOver(wxWindow *parent)
// Buttons
wxStdDialogButtonSizer *ButtonSizer = CreateStdDialogButtonSizer(wxOK | wxCANCEL | wxHELP);
Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogPasteOver::OnOK, this, wxID_OK);
Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::tr1::bind(&HelpButton::OpenPage, "Paste Over"), wxID_HELP);
Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&HelpButton::OpenPage, "Paste Over"), wxID_HELP);
// Main sizer
wxSizer *MainSizer = new wxBoxSizer(wxVERTICAL);

View File

@ -92,12 +92,12 @@ public:
};
class TaskRunner : public wxThread {
std::tr1::function<void(agi::ProgressSink*)> task;
std::function<void(agi::ProgressSink*)> task;
agi::ProgressSink *ps;
wxDialog *dialog;
public:
TaskRunner(std::tr1::function<void(agi::ProgressSink*)> task, agi::ProgressSink *ps, wxDialog *dialog, int priority)
TaskRunner(std::function<void(agi::ProgressSink*)> task, agi::ProgressSink *ps, wxDialog *dialog, int priority)
: task(task)
, ps(ps)
, dialog(dialog)
@ -160,7 +160,7 @@ DialogProgress::DialogProgress(wxWindow *parent, wxString const& title_text, wxS
Bind(EVT_LOG, &DialogProgress::OnLog, this);
}
void DialogProgress::Run(std::tr1::function<void(agi::ProgressSink*)> task, int priority) {
void DialogProgress::Run(std::function<void(agi::ProgressSink*)> task, int priority) {
DialogProgressSink ps(this);
this->ps = &ps;
new TaskRunner(task, &ps, this, priority);

View File

@ -66,5 +66,5 @@ public:
DialogProgress(wxWindow *parent, wxString const& title="", wxString const& message="");
/// BackgroundWorker implementation
void Run(std::tr1::function<void(agi::ProgressSink *)> task, int priority=-1);
void Run(std::function<void(agi::ProgressSink *)> task, int priority=-1);
};

View File

@ -122,7 +122,7 @@ DialogProperties::DialogProperties(agi::Context *c)
// Button sizer
wxStdDialogButtonSizer *ButtonSizer = CreateStdDialogButtonSizer(wxOK | wxCANCEL | wxHELP);
Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogProperties::OnOK, this, wxID_OK);
Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::tr1::bind(&HelpButton::OpenPage, "Properties"), wxID_HELP);
Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&HelpButton::OpenPage, "Properties"), wxID_HELP);
// MainSizer
wxSizer *MainSizer = new wxBoxSizer(wxVERTICAL);

View File

@ -23,7 +23,7 @@
#ifndef AGI_PRE
#include <algorithm>
#include <tr1/functional>
#include <functional>
#include <wx/checkbox.h>
#include <wx/sizer.h>
@ -115,7 +115,7 @@ DialogResample::DialogResample(agi::Context *c, ResampleSettings &settings)
CenterOnParent();
// Bind events
using std::tr1::bind;
using std::bind;
Bind(wxEVT_COMMAND_BUTTON_CLICKED, bind(&HelpButton::OpenPage, "Resample resolution"), wxID_HELP);
from_video->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogResample::SetDestFromVideo, this);
symmetrical->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &DialogResample::OnSymmetrical, this);
@ -248,7 +248,7 @@ void ResampleResolution(AssFile *ass, ResampleSettings const& settings) {
if (settings.change_ar)
state.ar = state.rx / state.ry;
for_each(ass->Line.begin(), ass->Line.end(), bind(resample_line, &state, std::tr1::placeholders::_1));
for_each(ass->Line.begin(), ass->Line.end(), bind(resample_line, &state, std::placeholders::_1));
ass->SetScriptInfo("PlayResX", wxString::Format("%d", settings.script_x));
ass->SetScriptInfo("PlayResY", wxString::Format("%d", settings.script_y));

View File

@ -136,11 +136,11 @@ DialogSearchReplace::DialogSearchReplace(agi::Context* c, bool withReplace)
Search.OnDialogOpen();
Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::tr1::bind(&DialogSearchReplace::FindReplace, this, 0), BUTTON_FIND_NEXT);
Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::tr1::bind(&DialogSearchReplace::FindReplace, this, 1), BUTTON_REPLACE_NEXT);
Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::tr1::bind(&DialogSearchReplace::FindReplace, this, 2), BUTTON_REPLACE_ALL);
Bind(wxEVT_SET_FOCUS, std::tr1::bind(&SearchReplaceEngine::SetFocus, &Search, true));
Bind(wxEVT_KILL_FOCUS, std::tr1::bind(&SearchReplaceEngine::SetFocus, &Search, false));
Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&DialogSearchReplace::FindReplace, this, 0), BUTTON_FIND_NEXT);
Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&DialogSearchReplace::FindReplace, this, 1), BUTTON_REPLACE_NEXT);
Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&DialogSearchReplace::FindReplace, this, 2), BUTTON_REPLACE_ALL);
Bind(wxEVT_SET_FOCUS, std::bind(&SearchReplaceEngine::SetFocus, &Search, true));
Bind(wxEVT_KILL_FOCUS, std::bind(&SearchReplaceEngine::SetFocus, &Search, false));
}
DialogSearchReplace::~DialogSearchReplace() {

View File

@ -77,8 +77,8 @@ static wxString AssDialogue::* get_field(int field_n) {
}
}
std::tr1::function<bool (wxString)> get_predicate(int mode, wxRegEx *re, bool match_case, wxString const& match_text) {
using std::tr1::placeholders::_1;
std::function<bool (wxString)> get_predicate(int mode, wxRegEx *re, bool match_case, wxString const& match_text) {
using std::placeholders::_1;
switch (mode) {
case MODE_REGEXP:
@ -110,7 +110,7 @@ static std::set<AssDialogue*> process(wxString match_text, bool match_case, int
}
wxString AssDialogue::*field = get_field(field_n);
std::tr1::function<bool (wxString)> pred = get_predicate(mode, &re, match_case, match_text);
std::function<bool (wxString)> pred = get_predicate(mode, &re, match_case, match_text);
std::set<AssDialogue*> matches;
for (entryIter it = ass->Line.begin(); it != ass->Line.end(); ++it) {
@ -189,9 +189,9 @@ wxDialog (c->parent, -1, _("Select"), wxDefaultPosition, wxDefaultSize, wxCAPTIO
match_mode->SetSelection(OPT_GET("Tool/Select Lines/Mode")->GetInt());
Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogSelection::Process, this, wxID_OK);
Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::tr1::bind(&HelpButton::OpenPage, "Select Lines"), wxID_HELP);
apply_to_comments->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, std::tr1::bind(&DialogSelection::OnDialogueCheckbox, this, apply_to_dialogue));
apply_to_dialogue->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, std::tr1::bind(&DialogSelection::OnDialogueCheckbox, this, apply_to_comments));
Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&HelpButton::OpenPage, "Select Lines"), wxID_HELP);
apply_to_comments->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, std::bind(&DialogSelection::OnDialogueCheckbox, this, apply_to_dialogue));
apply_to_dialogue->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, std::bind(&DialogSelection::OnDialogueCheckbox, this, apply_to_comments));
}
DialogSelection::~DialogSelection() {

View File

@ -192,7 +192,7 @@ DialogShiftTimes::DialogShiftTimes(agi::Context *context)
CenterOnParent();
Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogShiftTimes::Process, this, wxID_OK);
Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::tr1::bind(&HelpButton::OpenPage, "Shift Times"), wxID_HELP);
Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&HelpButton::OpenPage, "Shift Times"), wxID_HELP);
shift_time->Bind(wxEVT_COMMAND_TEXT_ENTER, &DialogShiftTimes::Process, this);
history_box->Bind(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, &DialogShiftTimes::OnHistoryClick, this);
}

View File

@ -399,13 +399,13 @@ DialogStyleEditor::DialogStyleEditor(wxWindow *parent, AssStyle *style, agi::Con
PreviewText->Bind(wxEVT_COMMAND_TEXT_UPDATED, &DialogStyleEditor::OnPreviewTextChange, this);
}
Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::tr1::bind(&DialogStyleEditor::Apply, this, true, true), wxID_OK);
Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::tr1::bind(&DialogStyleEditor::Apply, this, true, false), wxID_APPLY);
Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::tr1::bind(&DialogStyleEditor::Apply, this, false, true), wxID_CANCEL);
Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::tr1::bind(&HelpButton::OpenPage, "Style Editor"), wxID_HELP);
Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&DialogStyleEditor::Apply, this, true, true), wxID_OK);
Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&DialogStyleEditor::Apply, this, true, false), wxID_APPLY);
Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&DialogStyleEditor::Apply, this, false, true), wxID_CANCEL);
Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&HelpButton::OpenPage, "Style Editor"), wxID_HELP);
for (int i = 0; i < 4; ++i)
colorButton[i]->Bind(wxEVT_COMMAND_BUTTON_CLICKED, bind(&DialogStyleEditor::OnSetColor, this, i + 1, std::tr1::placeholders::_1));
colorButton[i]->Bind(wxEVT_COMMAND_BUTTON_CLICKED, bind(&DialogStyleEditor::OnSetColor, this, i + 1, std::placeholders::_1));
}
DialogStyleEditor::~DialogStyleEditor() {

View File

@ -37,7 +37,7 @@
#ifndef AGI_PRE
#include <algorithm>
#include <tr1/functional>
#include <functional>
#include <wx/bmpbuttn.h>
#include <wx/clipbrd.h>
@ -67,7 +67,7 @@
#include "subtitle_format.h"
#include "utils.h"
using std::tr1::placeholders::_1;
using std::placeholders::_1;
namespace {
@ -156,7 +156,7 @@ DialogStyleManager::DialogStyleManager(agi::Context *context)
, commit_connection(c->ass->AddCommitListener(&DialogStyleManager::LoadCurrentStyles, this))
, active_line_connection(c->selectionController->AddActiveLineListener(&DialogStyleManager::OnActiveLineChanged, this))
{
using std::tr1::bind;
using std::bind;
SetIcon(GETICON(style_toolbutton_16));
// Catalog

View File

@ -38,7 +38,7 @@
#ifndef AGI_PRE
#include <algorithm>
#include <tr1/functional>
#include <functional>
#include <wx/button.h>
#include <wx/checkbox.h>
@ -64,7 +64,7 @@
#include "video_context.h"
namespace {
using std::tr1::placeholders::_1;
using std::placeholders::_1;
void set_ctrl_state(wxCommandEvent &evt, wxCheckBox *cb, wxTextCtrl *tc) {
tc->Enable(cb->IsChecked());
@ -103,7 +103,7 @@ DialogTimingProcessor::DialogTimingProcessor(agi::Context *c)
: wxDialog(c->parent, -1, _("Timing Post-Processor"))
, c(c)
{
using std::tr1::bind;
using std::bind;
SetIcon(GETICON(timing_processor_toolbutton_16));

View File

@ -64,9 +64,9 @@
#include <wx/txtstrm.h>
#include <algorithm>
#include <functional>
#include <memory>
#include <set>
#include <tr1/functional>
#include <vector>
#endif
@ -547,7 +547,7 @@ VersionCheckerResultDialog::VersionCheckerResultDialog(const wxString &main_text
Centre();
Show();
Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::tr1::bind(&VersionCheckerResultDialog::Close, this, false), wxID_OK);
Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&VersionCheckerResultDialog::Close, this, false), wxID_OK);
Bind(wxEVT_COMMAND_BUTTON_CLICKED, &VersionCheckerResultDialog::OnRemindMeLater, this, wxID_NO);
Bind(wxEVT_CLOSE_WINDOW, &VersionCheckerResultDialog::OnClose, this);
}

View File

@ -117,7 +117,7 @@ FFMS_Index *FFmpegSourceProvider::DoIndexing(FFMS_Indexer *Indexer, const wxStri
// index all audio tracks
FFMS_Index *Index;
Progress.Run(bind(DoIndexingWrapper, &Index, Indexer, Trackmask, IndexEH, std::tr1::placeholders::_1, &ErrInfo));
Progress.Run(std::bind(DoIndexingWrapper, &Index, Indexer, Trackmask, IndexEH, std::placeholders::_1, &ErrInfo));
if (Index == NULL) {
MsgString.Append("Failed to index: ").Append(wxString(ErrInfo.Buffer, wxConvUTF8));

View File

@ -35,7 +35,7 @@
#include <wx/intl.h>
#endif
using namespace std::tr1::placeholders;
using namespace std::placeholders;
FontCollector::FontCollector(FontCollectorStatusCallback status_callback, FontFileLister &lister)
: status_callback(status_callback)

View File

@ -24,7 +24,7 @@
#ifndef AGI_PRE
#include <list>
#include <map>
#include <tr1/functional>
#include <functional>
#include <set>
#include <vector>
@ -34,7 +34,7 @@
class AssDialogue;
class AssFile;
typedef std::tr1::function<void (wxString, int)> FontCollectorStatusCallback;
typedef std::function<void (wxString, int)> FontCollectorStatusCallback;
/// @class FontFileLister
/// @brief Font lister interface

View File

@ -233,7 +233,7 @@ OpenGLTextGlyph const& OpenGLText::CreateGlyph(int n) {
// No texture could fit it, create a new one
if (!ok) {
textures.push_back(std::tr1::shared_ptr<OpenGLTextTexture>(new OpenGLTextTexture(glyph)));
textures.push_back(std::shared_ptr<OpenGLTextTexture>(new OpenGLTextTexture(glyph)));
}
return glyph;

View File

@ -35,7 +35,7 @@
#ifndef AGI_PRE
#include <boost/container/map.hpp>
#include <tr1/memory>
#include <memory>
#include <vector>
#include <wx/colour.h>
@ -86,7 +86,7 @@ class OpenGLText {
glyphMap glyphs;
/// DOCME
std::vector<std::tr1::shared_ptr<OpenGLTextTexture> > textures;
std::vector<std::shared_ptr<OpenGLTextTexture> > textures;
OpenGLText(OpenGLText const&);
OpenGLText& operator=(OpenGLText const&);

View File

@ -38,8 +38,8 @@
#ifndef AGI_PRE
#include <algorithm>
#include <functional>
#include <map>
#include <tr1/functional>
#include <wx/filename.h>
#include <wx/msgdlg.h>
@ -83,7 +83,7 @@ static void init_static() {
HelpButton::HelpButton(wxWindow *parent, wxString const& page, wxPoint position, wxSize size)
: wxButton(parent, wxID_HELP, "", position, size)
{
Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::tr1::bind(&HelpButton::OpenPage, page));
Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&HelpButton::OpenPage, page));
init_static();
if (pages->find(page) == pages->end())
throw agi::InternalError("Invalid help page", 0);

View File

@ -166,7 +166,7 @@ public:
void Apply(Hotkey::HotkeyMap *hk_map) {
for_each(children.begin(), children.end(),
bind(&HotkeyModelCombo::Apply, std::tr1::placeholders::_1, hk_map));
bind(&HotkeyModelCombo::Apply, std::placeholders::_1, hk_map));
}
void SetFilter(wxRegEx const& new_filter) {
@ -239,7 +239,7 @@ public:
void Apply(Hotkey::HotkeyMap *hk_map) {
for_each(categories.begin(), categories.end(),
bind(&HotkeyModelCategory::Apply, std::tr1::placeholders::_1, hk_map));
bind(&HotkeyModelCategory::Apply, std::placeholders::_1, hk_map));
}
void SetFilter(wxString filter) {
@ -250,7 +250,7 @@ public:
// Using wxRegEx for case-insensitive contains
wxRegEx re(filter, wxRE_ADVANCED | wxRE_ICASE | wxRE_NOSUB);
for_each(categories.begin(), categories.end(),
bind(&HotkeyModelCategory::SetFilter, std::tr1::placeholders::_1, std::tr1::ref(re)));
bind(&HotkeyModelCategory::SetFilter, std::placeholders::_1, std::ref(re)));
}
wxDataViewItem GetParent() const { return wxDataViewItem(0); }
@ -305,7 +305,7 @@ bool HotkeyDataViewModel::IsContainer(wxDataViewItem const& item) const {
bool HotkeyDataViewModel::SetValue(wxVariant const& variant, wxDataViewItem const& item, unsigned int col) {
if (!has_pending_changes) {
has_pending_changes = true;
parent->AddPendingChange(std::tr1::bind(&HotkeyDataViewModel::Apply, this));
parent->AddPendingChange(std::bind(&HotkeyDataViewModel::Apply, this));
}
return get(item)->SetValue(variant, col);
}
@ -329,7 +329,7 @@ void HotkeyDataViewModel::Delete(wxDataViewItem const& item) {
if (!has_pending_changes) {
has_pending_changes = true;
parent->AddPendingChange(std::tr1::bind(&HotkeyDataViewModel::Apply, this));
parent->AddPendingChange(std::bind(&HotkeyDataViewModel::Apply, this));
}
}

View File

@ -51,8 +51,8 @@ namespace {
/// Window ID of first menu item
static const int MENU_ID_BASE = 10000;
using std::tr1::placeholders::_1;
using std::tr1::bind;
using std::placeholders::_1;
using std::bind;
class MruMenu : public wxMenu {
std::string type;

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(bind(read_subtitles, std::tr1::placeholders::_1, file, &input, srt, totalTime, &parser));
progress.Run(bind(read_subtitles, std::placeholders::_1, file, &input, srt, totalTime, &parser));
}
catch (...) {
mkv_Close(file);

View File

@ -714,7 +714,7 @@ Preferences::Preferences(wxWindow *parent): wxDialog(parent, -1, _("Preferences"
Bind(wxEVT_COMMAND_BUTTON_CLICKED, &Preferences::OnOK, this, wxID_OK);
Bind(wxEVT_COMMAND_BUTTON_CLICKED, &Preferences::OnApply, this, wxID_APPLY);
Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::tr1::bind(&HelpButton::OpenPage, "Options"), wxID_HELP);
Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&HelpButton::OpenPage, "Options"), wxID_HELP);
defaultButton->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &Preferences::OnResetDefault, this);
}

View File

@ -19,7 +19,7 @@
#ifndef AGI_PRE
#include <deque>
#include <tr1/functional>
#include <functional>
#include <map>
#include <wx/dialog.h>
@ -37,7 +37,7 @@ DEFINE_SIMPLE_EXCEPTION_NOINNER(PreferenceNotSupported, PreferencesError, "prefe
class Preferences : public wxDialog {
public:
typedef std::tr1::function<void ()> Thunk;
typedef std::function<void ()> Thunk;
private:
wxTreebook *book;
wxButton *applyButton;

View File

@ -225,7 +225,7 @@ void OptionPage::OptionBrowse(wxFlexGridSizer *flex, const wxString &name, const
text->Bind(wxEVT_COMMAND_TEXT_UPDATED, StringUpdater(opt_name, parent));
wxButton *browse = new wxButton(this, -1, _("Browse..."));
browse->Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::tr1::bind(browse_button, text));
browse->Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(browse_button, text));
wxSizer *button_sizer = new wxBoxSizer(wxHORIZONTAL);
button_sizer->Add(text, wxSizerFlags(1).Expand());
@ -260,7 +260,7 @@ void OptionPage::OptionFont(wxSizer *sizer, std::string opt_prefix) {
font_size->Bind(wxEVT_COMMAND_SPINCTRL_UPDATED, IntUpdater(size_opt->GetName().c_str(), parent));
wxButton *pick_btn = new wxButton(this, -1, _("Choose..."));
pick_btn->Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::tr1::bind(font_button, parent, font_name, font_size));
pick_btn->Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(font_button, parent, font_name, font_size));
wxSizer *button_sizer = new wxBoxSizer(wxHORIZONTAL);
button_sizer->Add(font_name, wxSizerFlags(1).Expand());

View File

@ -35,7 +35,7 @@
#include "config.h"
#ifndef AGI_PRE
#include <tr1/functional>
#include <functional>
#include <wx/button.h>
#include <wx/checkbox.h>
@ -105,7 +105,7 @@ SubsEditBox::SubsEditBox(wxWindow *parent, agi::Context *context)
, commitId(-1)
, undoTimer(GetEventHandler())
{
using std::tr1::bind;
using std::bind;
// Top controls
TopSizer = new wxBoxSizer(wxHORIZONTAL);
@ -235,7 +235,7 @@ void SubsEditBox::MakeButton(const char *cmd_name) {
ToolTipManager::Bind(btn, command->StrHelp(), "Subtitle Edit Box", cmd_name);
MiddleBotSizer->Add(btn, wxSizerFlags().Center().Expand());
btn->Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::tr1::bind(&SubsEditBox::CallCommand, this, cmd_name));
btn->Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&SubsEditBox::CallCommand, this, cmd_name));
}
wxComboBox *SubsEditBox::MakeComboBox(wxString const& initial_text, int style, void (SubsEditBox::*handler)(wxCommandEvent&), wxString const& tooltip) {
@ -391,7 +391,7 @@ void SubsEditBox::OnUndoTimer(wxTimerEvent&) {
template<class T, class setter>
void SubsEditBox::SetSelectedRows(setter set, T value, wxString desc, int type, bool amend) {
for_each(sel.begin(), sel.end(), bind(set, std::tr1::placeholders::_1, value));
for_each(sel.begin(), sel.end(), bind(set, std::placeholders::_1, value));
file_changed_slot.Block();
commitId = c->ass->Commit(desc, type, (amend && desc == lastCommitType) ? commitId : -1, sel.size() == 1 ? *sel.begin() : 0);

View File

@ -35,11 +35,8 @@
#include "config.h"
#ifndef AGI_PRE
#ifdef _WIN32
#include <functional>
#else
#include <tr1/functional>
#endif
#include <wx/clipbrd.h>
#include <wx/intl.h>
#include <wx/menu.h>
@ -166,7 +163,7 @@ SubsTextEditCtrl::SubsTextEditCtrl(wxWindow* parent, wxSize wsize, long style, a
proto.Add("fax;Factor");
proto.Add("fay;Factor");
using namespace std::tr1;
using std::bind;
Bind(wxEVT_CHAR_HOOK, &SubsTextEditCtrl::OnKeyDown, this);

View File

@ -57,7 +57,7 @@
#include "utils.h"
#include "video_context.h"
using namespace std::tr1::placeholders;
using namespace std::placeholders;
SubtitleFormat::SubtitleFormat(wxString const& name)
: name(name)

View File

@ -124,7 +124,7 @@ static void wait_for_cache_thread(FontConfigCacheThread const * const * const ca
if (!*cache_worker) return;
DialogProgress progress(wxGetApp().frame, "Updating font index", "This may take several minutes");
progress.Run(bind(do_wait, std::tr1::placeholders::_1, cache_worker));
progress.Run(std::bind(do_wait, std::placeholders::_1, cache_worker));
}
/// @brief Constructor

View File

@ -65,8 +65,8 @@ static void delete_frame(AegiVideoFrame *frame) {
delete frame;
}
std::tr1::shared_ptr<AegiVideoFrame> ThreadedFrameSource::ProcFrame(int frameNum, double time, bool raw) {
std::tr1::shared_ptr<AegiVideoFrame> frame(new AegiVideoFrame, delete_frame);
std::shared_ptr<AegiVideoFrame> ThreadedFrameSource::ProcFrame(int frameNum, double time, bool raw) {
std::shared_ptr<AegiVideoFrame> frame(new AegiVideoFrame, delete_frame);
{
wxMutexLocker locker(providerMutex);
try {
@ -225,7 +225,7 @@ void ThreadedFrameSource::RequestFrame(int frame, double time) throw() {
jobReady.Signal();
}
std::tr1::shared_ptr<AegiVideoFrame> ThreadedFrameSource::GetFrame(int frame, double time, bool raw) {
std::shared_ptr<AegiVideoFrame> ThreadedFrameSource::GetFrame(int frame, double time, bool raw) {
return ProcFrame(frame, time, raw);
}

View File

@ -33,7 +33,7 @@
///
#ifndef AGI_PRE
#include <tr1/memory>
#include <memory>
#include <wx/event.h>
#include <wx/thread.h>
@ -78,7 +78,7 @@ class ThreadedFrameSource : public wxThread {
bool run; ///< Should the thread continue to run
void *Entry();
std::tr1::shared_ptr<AegiVideoFrame> ProcFrame(int frameNum, double time, bool raw = false);
std::shared_ptr<AegiVideoFrame> ProcFrame(int frameNum, double time, bool raw = false);
public:
/// @brief Load the passed subtitle file
/// @param subs File to load
@ -99,7 +99,7 @@ public:
/// @brief frame Frame number
/// @brief time Exact start time of the frame in seconds
/// @brief raw Get raw frame without subtitles
std::tr1::shared_ptr<AegiVideoFrame> GetFrame(int frame, double time, bool raw = false);
std::shared_ptr<AegiVideoFrame> GetFrame(int frame, double time, bool raw = false);
/// Get a reference to the video provider this is using
VideoProvider *GetVideoProvider() const { return videoProvider.get(); }
@ -116,11 +116,11 @@ public:
class FrameReadyEvent : public wxEvent {
public:
/// Frame which is ready
std::tr1::shared_ptr<AegiVideoFrame> frame;
std::shared_ptr<AegiVideoFrame> frame;
/// Time which was used for subtitle rendering
double time;
wxEvent *Clone() const { return new FrameReadyEvent(*this); };
FrameReadyEvent(std::tr1::shared_ptr<AegiVideoFrame> frame, double time)
FrameReadyEvent(std::shared_ptr<AegiVideoFrame> frame, double time)
: frame(frame), time(time) {
}
};

View File

@ -37,7 +37,7 @@
#include "timeedit_ctrl.h"
#ifndef AGI_PRE
#include <tr1/functional>
#include <functional>
#include <wx/clipbrd.h>
#include <wx/dataobj.h>
@ -88,8 +88,8 @@ TimeEdit::TimeEdit(wxWindow* parent, wxWindowID id, agi::Context *c, const wxStr
// Other stuff
if (!value) SetValue(time.GetAssFormated());
Bind(wxEVT_COMMAND_MENU_SELECTED, std::tr1::bind(&TimeEdit::CopyTime, this), Time_Edit_Copy);
Bind(wxEVT_COMMAND_MENU_SELECTED, std::tr1::bind(&TimeEdit::PasteTime, this), Time_Edit_Paste);
Bind(wxEVT_COMMAND_MENU_SELECTED, std::bind(&TimeEdit::CopyTime, this), Time_Edit_Copy);
Bind(wxEVT_COMMAND_MENU_SELECTED, std::bind(&TimeEdit::PasteTime, this), Time_Edit_Paste);
Bind(wxEVT_COMMAND_TEXT_UPDATED, &TimeEdit::OnModified, this);
Bind(wxEVT_CONTEXT_MENU, &TimeEdit::OnContextMenu, this);
Bind(wxEVT_KEY_DOWN, &TimeEdit::OnKeyDown, this);

View File

@ -68,7 +68,7 @@
static void add_button(wxWindow *parent, wxSizer *sizer, const char *command, agi::Context *context) {
cmd::Command *c = cmd::get(command);
wxBitmapButton *btn = new wxBitmapButton(parent, -1, c->Icon(24));
btn->Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::tr1::bind(&cmd::Command::operator(), c, context));
btn->Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&cmd::Command::operator(), c, context));
ToolTipManager::Bind(btn, c->StrHelp(), "Video", command);
sizer->Add(btn, 0, wxTOP | wxLEFT | wxBOTTOM | wxALIGN_CENTER, 2);
}

View File

@ -290,7 +290,7 @@ void VideoContext::GetFrameAsync(int n) {
provider->RequestFrame(n, TimeAtFrame(n) / 1000.0);
}
std::tr1::shared_ptr<AegiVideoFrame> VideoContext::GetFrame(int n, bool raw) {
std::shared_ptr<AegiVideoFrame> VideoContext::GetFrame(int n, bool raw) {
return provider->GetFrame(n, TimeAtFrame(n) / 1000.0, raw);
}

View File

@ -165,7 +165,7 @@ public:
/// @param n Frame number to get
/// @param raw If true, subtitles are not rendered on the frame
/// @return The requested frame
std::tr1::shared_ptr<AegiVideoFrame> GetFrame(int n, bool raw = false);
std::shared_ptr<AegiVideoFrame> GetFrame(int n, bool raw = false);
/// Asynchronously get a video frame, triggering a EVT_FRAME_READY event when it's ready
/// @param n Frame number to get

View File

@ -114,7 +114,7 @@ VideoDisplay::VideoDisplay(
slots.push_back(con->ass->AddFileSaveListener(&VideoDisplay::OnSubtitlesSave, this));
Bind(wxEVT_PAINT, std::tr1::bind(&VideoDisplay::Render, this));
Bind(wxEVT_PAINT, std::bind(&VideoDisplay::Render, this));
Bind(wxEVT_SIZE, &VideoDisplay::OnSizeEvent, this);
Bind(wxEVT_CONTEXT_MENU, &VideoDisplay::OnContextMenu, this);
Bind(wxEVT_ENTER_WINDOW, &VideoDisplay::OnMouseEvent, this);

View File

@ -35,7 +35,7 @@
#ifndef AGI_PRE
#include <list>
#include <tr1/memory>
#include <memory>
#include <wx/glcanvas.h>
#endif
@ -115,7 +115,7 @@ class VideoDisplay : public wxGLCanvas {
bool freeSize;
/// Frame which will replace the currently visible frame on the next render
std::tr1::shared_ptr<AegiVideoFrame> pending_frame;
std::shared_ptr<AegiVideoFrame> pending_frame;
/// @brief Draw an overscan mask
/// @param horizontal_percent The percent of the video reserved horizontally

View File

@ -41,7 +41,7 @@
#ifndef AGI_PRE
#include <algorithm>
#include <tr1/functional>
#include <functional>
#endif
/// A video frame and its frame number
@ -56,7 +56,7 @@ VideoProviderCache::VideoProviderCache(VideoProvider *parent)
}
VideoProviderCache::~VideoProviderCache() {
for_each(cache.begin(), cache.end(), std::tr1::mem_fn(&AegiVideoFrame::Clear));
for_each(cache.begin(), cache.end(), std::mem_fn(&AegiVideoFrame::Clear));
}
const AegiVideoFrame VideoProviderCache::GetFrame(int n) {

View File

@ -47,7 +47,7 @@ static void for_each(C &range, F func) {
std::for_each(range.begin(), range.end(), func);
}
using std::tr1::placeholders::_1;
using std::placeholders::_1;
const wxColour VisualToolBase::colour[4] = {wxColour(106,32,19), wxColour(255,169,40), wxColour(255,253,185), wxColour(187,0,0)};

View File

@ -24,7 +24,7 @@
#ifndef AGI_PRE
#include <algorithm>
#include <tr1/functional>
#include <functional>
#include <wx/bmpbuttn.h>
#include <wx/toolbar.h>
@ -160,7 +160,7 @@ template<class T> static bool cmp_line(T const& lft, T const& rgt) {
}
template<class C, class T> static bool line_not_present(C const& set, T const& it) {
return find_if(set.begin(), set.end(), bind(cmp_line<T>, it, std::tr1::placeholders::_1)) == set.end();
return find_if(set.begin(), set.end(), bind(cmp_line<T>, it, std::placeholders::_1)) == set.end();
}
void VisualToolDrag::OnSelectedSetChanged(const SubtitleSelection &added, const SubtitleSelection &removed) {

View File

@ -14,9 +14,6 @@
//
// $Id$
// gtest's tr1 tuple implementation lacks tie, and we require tr1 support anyway
#define GTEST_USE_OWN_TR1_TUPLE 0
#include "main.h"
#include "util.h"
@ -188,10 +185,10 @@ TEST(lagi_hotkey, combo_stuff) {
Hotkey::HotkeyMap hm = Hotkey("", simple_valid).GetHotkeyMap();
Hotkey::HotkeyMap::const_iterator it, end;
std::tr1::tie(it, end) = hm.equal_range("cmd1");
std::tie(it, end) = hm.equal_range("cmd1");
EXPECT_EQ(3, std::distance(it, end));
std::tr1::tie(it, end) = hm.equal_range("cmd2");
std::tie(it, end) = hm.equal_range("cmd2");
ASSERT_EQ(1, std::distance(it, end));
Combo c = it->second;

View File

@ -158,7 +158,7 @@ TEST(lagi_iconv, Iso6937) {
// 7-bit is same as ISO-8859
for (int i = 0; i < 128; ++i) {
const char buf[] = { i, 0 };
const char buf[] = { (char)i, 0 };
std::string ret;
EXPECT_NO_THROW(ret = subst.Convert(buf));
EXPECT_STREQ(buf, ret.c_str());