diff --git a/src/audio_timing_dialogue.cpp b/src/audio_timing_dialogue.cpp index 3b53c80103d766adf1135d1ceeed41d78f587dc3..2b11fb1ac35798f217a867099602d4a582a8f7bb 100644 --- a/src/audio_timing_dialogue.cpp +++ b/src/audio_timing_dialogue.cpp @@ -754,8 +754,7 @@ void AudioTimingControllerDialogue::RegenerateInactiveLines() if (mode == 2) { - entryIter next = - find_if(++current_line, context->ass->Line.end(), predicate); + entryIter next = std::find_if(++current_line, context->ass->Line.end(), predicate); if (next != context->ass->Line.end()) AddInactiveLine(sel, static_cast<AssDialogue*>(&*next)); } diff --git a/src/auto4_lua.cpp b/src/auto4_lua.cpp index eb55c153924894b8c08fea993b2404f9cc64ee97..663abf5e929b066e89763ca95abe60caf540a2c3 100644 --- a/src/auto4_lua.cpp +++ b/src/auto4_lua.cpp @@ -931,7 +931,7 @@ namespace Automation4 { throw LuaForEachBreak(); } - advance(it, cur - last_idx); + std::advance(it, cur - last_idx); AssDialogue *diag = dynamic_cast<AssDialogue*>(&*it); if (!diag) { diff --git a/src/command/edit.cpp b/src/command/edit.cpp index 8f974a6407014f55cfd1097cb989be744db57744..a0f5a52397d240db7bac6d493fb8c3bf13d4b10b 100644 --- a/src/command/edit.cpp +++ b/src/command/edit.cpp @@ -843,7 +843,7 @@ struct edit_line_paste_over : public Command { AssDialogue *ret = paste_over(c->parent, pasteOverOptions, new_line, static_cast<AssDialogue*>(&*pos)); 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; }); } diff --git a/src/dialog_timing_processor.cpp b/src/dialog_timing_processor.cpp index a9c4e8042692923439ccd6d28c8c3498e9e858cd..3e4071758e8c9fbb12aca1229ba5b58cbe10da32 100644 --- a/src/dialog_timing_processor.cpp +++ b/src/dialog_timing_processor.cpp @@ -314,7 +314,7 @@ std::vector<AssDialogue*> DialogTimingProcessor::SortDialogues() { // Check if rows are valid for (auto diag : sorted) { 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( wxString::Format(_("One of the lines in the file (%i) has negative duration. Aborting."), line), _("Invalid script"), diff --git a/src/dialog_translation.cpp b/src/dialog_translation.cpp index 60a70357c107b4a9f180f76364e2615bcefc59a6..9fd4ca17609711a8192c5a52d1e38615b029f00e 100644 --- a/src/dialog_translation.cpp +++ b/src/dialog_translation.cpp @@ -66,8 +66,8 @@ DialogTranslation::DialogTranslation(agi::Context *c) , file_change_connection(c->ass->AddCommitListener(&DialogTranslation::OnExternalCommit, this)) , active_line_connection(c->selectionController->AddActiveLineListener(&DialogTranslation::OnActiveLineChanged, this)) , active_line(c->selectionController->GetActiveLine()) -, line_count(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_count(std::count_if(c->ass->Line.begin(), c->ass->Line.end(), cast<AssDialogue*>())) +, line_number(std::count_if(c->ass->Line.begin(), c->ass->Line.iterator_to(*active_line), cast<AssDialogue*>()) + 1) { SetIcon(GETICON(translation_toolbutton_16)); @@ -175,7 +175,7 @@ void DialogTranslation::OnActiveLineChanged(AssDialogue *new_line) { active_line = new_line; blocks = active_line->ParseTags(); 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()) { wxMessageBox(_("No more lines to translate.")); @@ -185,7 +185,7 @@ void DialogTranslation::OnActiveLineChanged(AssDialogue *new_line) { void DialogTranslation::OnExternalCommit(int commit_type) { 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)); } diff --git a/src/threaded_frame_source.cpp b/src/threaded_frame_source.cpp index 9cf07337634469351a07c92cde1493215793eda6..f855a963b7151b8ed14e3383cfcef2dadf40d6e6 100644 --- a/src/threaded_frame_source.cpp +++ b/src/threaded_frame_source.cpp @@ -150,7 +150,7 @@ void ThreadedFrameSource::UpdateSubtitles(const AssFile *new_subs, std::set<cons size_t i = 0; auto it = subs->Line.begin(); for (auto& update : changed) { - advance(it, update.first - i); + std::advance(it, update.first - i); i = update.first; subs->Line.insert(it, *update.second); delete &*it--;