SecBSD's official ports repository

This commit is contained in:
purplerain 2023-08-16 22:26:55 +00:00
commit 2c0afcbbf3
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
64331 changed files with 5339189 additions and 0 deletions

View file

@ -0,0 +1,28 @@
Replace std::not1 with a lambda (fixes #146).
6d1d2fb5a282dac4b510a7b105dd3c5f07efaeda
Index: apertium/perceptron_spec.cc
--- apertium/perceptron_spec.cc.orig
+++ apertium/perceptron_spec.cc
@@ -574,8 +574,9 @@ PerceptronSpec::Machine::execCommonOp(Opcode op)
case FILTERIN: {
const VMSet& set_op = get_set_operand();
std::vector<std::string> &str_arr = stack.top().strArr();
+ In comp(set_op);
str_arr.erase(std::remove_if(
- str_arr.begin(), str_arr.end(), std::not1(In(set_op))));
+ str_arr.begin(), str_arr.end(), [&](const std::string& e){return !comp(e);} ));
} break;
/*
case SETHAS: {
@@ -595,8 +596,9 @@ PerceptronSpec::Machine::execCommonOp(Opcode op)
case SETHASALL: {
const VMSet& set_op = get_set_operand();
std::vector<std::string> str_arr = stack.pop_off().strArr();
+ In comp(set_op);
stack.push(
- std::find_if(str_arr.begin(), str_arr.end(), std::not1(In(set_op))) ==
+ std::find_if(str_arr.begin(), str_arr.end(), [&](const std::string& e){return !comp(e);} ) ==
str_arr.end()
);
} break;