forked from mia/Aegisub
Fix compilation
This commit is contained in:
parent
25d2ac5143
commit
a144ce8776
6 changed files with 9 additions and 10 deletions
|
@ -754,8 +754,7 @@ void AudioTimingControllerDialogue::RegenerateInactiveLines()
|
||||||
|
|
||||||
if (mode == 2)
|
if (mode == 2)
|
||||||
{
|
{
|
||||||
entryIter next =
|
entryIter next = std::find_if(++current_line, context->ass->Line.end(), predicate);
|
||||||
find_if(++current_line, context->ass->Line.end(), predicate);
|
|
||||||
if (next != context->ass->Line.end())
|
if (next != context->ass->Line.end())
|
||||||
AddInactiveLine(sel, static_cast<AssDialogue*>(&*next));
|
AddInactiveLine(sel, static_cast<AssDialogue*>(&*next));
|
||||||
}
|
}
|
||||||
|
|
|
@ -931,7 +931,7 @@ namespace Automation4 {
|
||||||
throw LuaForEachBreak();
|
throw LuaForEachBreak();
|
||||||
}
|
}
|
||||||
|
|
||||||
advance(it, cur - last_idx);
|
std::advance(it, cur - last_idx);
|
||||||
|
|
||||||
AssDialogue *diag = dynamic_cast<AssDialogue*>(&*it);
|
AssDialogue *diag = dynamic_cast<AssDialogue*>(&*it);
|
||||||
if (!diag) {
|
if (!diag) {
|
||||||
|
|
|
@ -843,7 +843,7 @@ struct edit_line_paste_over : public Command {
|
||||||
|
|
||||||
AssDialogue *ret = paste_over(c->parent, pasteOverOptions, new_line, static_cast<AssDialogue*>(&*pos));
|
AssDialogue *ret = paste_over(c->parent, pasteOverOptions, new_line, static_cast<AssDialogue*>(&*pos));
|
||||||
if (ret)
|
if (ret)
|
||||||
pos = find_if(next(pos), c->ass->Line.end(), cast<AssDialogue*>());
|
pos = std::find_if(std::next(pos), c->ass->Line.end(), cast<AssDialogue*>());
|
||||||
return ret;
|
return ret;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -314,7 +314,7 @@ std::vector<AssDialogue*> DialogTimingProcessor::SortDialogues() {
|
||||||
// Check if rows are valid
|
// Check if rows are valid
|
||||||
for (auto diag : sorted) {
|
for (auto diag : sorted) {
|
||||||
if (diag->Start > diag->End) {
|
if (diag->Start > diag->End) {
|
||||||
int line = count_if(c->ass->Line.begin(), c->ass->Line.iterator_to(*diag), cast<const AssDialogue*>());
|
int line = std::count_if(c->ass->Line.begin(), c->ass->Line.iterator_to(*diag), cast<const AssDialogue*>());
|
||||||
wxMessageBox(
|
wxMessageBox(
|
||||||
wxString::Format(_("One of the lines in the file (%i) has negative duration. Aborting."), line),
|
wxString::Format(_("One of the lines in the file (%i) has negative duration. Aborting."), line),
|
||||||
_("Invalid script"),
|
_("Invalid script"),
|
||||||
|
|
|
@ -66,8 +66,8 @@ DialogTranslation::DialogTranslation(agi::Context *c)
|
||||||
, file_change_connection(c->ass->AddCommitListener(&DialogTranslation::OnExternalCommit, this))
|
, file_change_connection(c->ass->AddCommitListener(&DialogTranslation::OnExternalCommit, this))
|
||||||
, active_line_connection(c->selectionController->AddActiveLineListener(&DialogTranslation::OnActiveLineChanged, this))
|
, active_line_connection(c->selectionController->AddActiveLineListener(&DialogTranslation::OnActiveLineChanged, this))
|
||||||
, active_line(c->selectionController->GetActiveLine())
|
, active_line(c->selectionController->GetActiveLine())
|
||||||
, line_count(count_if(c->ass->Line.begin(), c->ass->Line.end(), cast<AssDialogue*>()))
|
, line_count(std::count_if(c->ass->Line.begin(), c->ass->Line.end(), cast<AssDialogue*>()))
|
||||||
, line_number(count_if(c->ass->Line.begin(), c->ass->Line.iterator_to(*active_line), cast<AssDialogue*>()) + 1)
|
, line_number(std::count_if(c->ass->Line.begin(), c->ass->Line.iterator_to(*active_line), cast<AssDialogue*>()) + 1)
|
||||||
{
|
{
|
||||||
SetIcon(GETICON(translation_toolbutton_16));
|
SetIcon(GETICON(translation_toolbutton_16));
|
||||||
|
|
||||||
|
@ -175,7 +175,7 @@ void DialogTranslation::OnActiveLineChanged(AssDialogue *new_line) {
|
||||||
active_line = new_line;
|
active_line = new_line;
|
||||||
blocks = active_line->ParseTags();
|
blocks = active_line->ParseTags();
|
||||||
cur_block = 0;
|
cur_block = 0;
|
||||||
line_number = count_if(c->ass->Line.begin(), c->ass->Line.iterator_to(*new_line), cast<AssDialogue*>()) + 1;
|
line_number = std::count_if(c->ass->Line.begin(), c->ass->Line.iterator_to(*new_line), cast<AssDialogue*>()) + 1;
|
||||||
|
|
||||||
if (bad_block(blocks[cur_block]) && !NextBlock()) {
|
if (bad_block(blocks[cur_block]) && !NextBlock()) {
|
||||||
wxMessageBox(_("No more lines to translate."));
|
wxMessageBox(_("No more lines to translate."));
|
||||||
|
@ -185,7 +185,7 @@ void DialogTranslation::OnActiveLineChanged(AssDialogue *new_line) {
|
||||||
|
|
||||||
void DialogTranslation::OnExternalCommit(int commit_type) {
|
void DialogTranslation::OnExternalCommit(int commit_type) {
|
||||||
if (commit_type == AssFile::COMMIT_NEW || commit_type & AssFile::COMMIT_DIAG_ADDREM) {
|
if (commit_type == AssFile::COMMIT_NEW || commit_type & AssFile::COMMIT_DIAG_ADDREM) {
|
||||||
line_count = count_if(c->ass->Line.begin(), c->ass->Line.end(), cast<AssDialogue*>());
|
line_count = std::count_if(c->ass->Line.begin(), c->ass->Line.end(), cast<AssDialogue*>());
|
||||||
line_number_display->SetLabel(wxString::Format(_("Current line: %d/%d"), (int)line_number, (int)line_count));
|
line_number_display->SetLabel(wxString::Format(_("Current line: %d/%d"), (int)line_number, (int)line_count));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -150,7 +150,7 @@ void ThreadedFrameSource::UpdateSubtitles(const AssFile *new_subs, std::set<cons
|
||||||
size_t i = 0;
|
size_t i = 0;
|
||||||
auto it = subs->Line.begin();
|
auto it = subs->Line.begin();
|
||||||
for (auto& update : changed) {
|
for (auto& update : changed) {
|
||||||
advance(it, update.first - i);
|
std::advance(it, update.first - i);
|
||||||
i = update.first;
|
i = update.first;
|
||||||
subs->Line.insert(it, *update.second);
|
subs->Line.insert(it, *update.second);
|
||||||
delete &*it--;
|
delete &*it--;
|
||||||
|
|
Loading…
Reference in a new issue