SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
28
textproc/apertium/patches/patch-apertium_perceptron_spec_cc
Normal file
28
textproc/apertium/patches/patch-apertium_perceptron_spec_cc
Normal 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;
|
Loading…
Add table
Add a link
Reference in a new issue