ChainSearch: fix broken logic when configuring base layer
There is an asymetry, insofar the base layer configuration is evaluated immediately, causing the MutableFilter to be reconfigured and forwarded to the first match. to the contrary, when configuring an additional layer, we just add it to the chain, but then need to iterate once to cause this configuration actually to be unfolded onto the stack
This commit is contained in:
parent
2ca3e95e9e
commit
5b92f5cf74
2 changed files with 17 additions and 16 deletions
|
|
@ -186,11 +186,12 @@ namespace iter {
|
|||
Step nextStep{forward<FUN> (configureSearchStep)};
|
||||
|
||||
if (_Base::isDisabled())
|
||||
this-> filter() = move (nextStep (*this)); // immediately apply first step
|
||||
else //
|
||||
stepChain_.emplace_back (move (nextStep)); // append all further steps into the chain...
|
||||
// then establish invariant:
|
||||
this->iterNext(); // expand to leaf and forward to first match
|
||||
this-> filter() = move (nextStep (*this)); // apply first step immediately
|
||||
else
|
||||
{
|
||||
stepChain_.emplace_back (move (nextStep)); // append all further steps into the chain...
|
||||
this->iterNext(); // then establish invariant:
|
||||
} // expand to leaf and forward to first match
|
||||
}
|
||||
return move(*this);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31994,9 +31994,9 @@
|
|||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1536018931433" ID="ID_1532889609" MODIFIED="1536326576841" TEXT="treeExplorer-Konfiguration">
|
||||
<arrowlink COLOR="#65a7b1" DESTINATION="ID_1044555993" ENDARROW="Default" ENDINCLINATION="70;92;" ID="Arrow_ID_575633930" STARTARROW="None" STARTINCLINATION="149;-3;"/>
|
||||
<icon BUILTIN="pencil"/>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1536353107155" HGAP="33" ID="ID_1163131751" MODIFIED="1536361617044" TEXT="Problem: Basis-Layer" VSHIFT="37">
|
||||
<node COLOR="#338800" CREATED="1536353107155" HGAP="33" ID="ID_1163131751" MODIFIED="1536632469176" TEXT="Problem: Basis-Layer" VSHIFT="37">
|
||||
<arrowlink COLOR="#4471b4" DESTINATION="ID_942897075" ENDARROW="Default" ENDINCLINATION="37;-79;" ID="Arrow_ID_537236489" STARTARROW="None" STARTINCLINATION="30;44;"/>
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node CREATED="1536353117930" ID="ID_625995057" MODIFIED="1536353132265" TEXT="hinzugefügt für "leeren" Zustand">
|
||||
<icon BUILTIN="info"/>
|
||||
</node>
|
||||
|
|
@ -32093,9 +32093,9 @@
|
|||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1536357878006" ID="ID_1225195123" MODIFIED="1536358257081" TEXT="Aufräumen und nachrüsten">
|
||||
<icon BUILTIN="pencil"/>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1536357891412" ID="ID_942897075" MODIFIED="1536533200019" TEXT="den Basis-Layer eliminieren">
|
||||
<node COLOR="#338800" CREATED="1536357891412" ID="ID_942897075" MODIFIED="1536632466623" TEXT="den Basis-Layer eliminieren">
|
||||
<linktarget COLOR="#4471b4" DESTINATION="ID_942897075" ENDARROW="Default" ENDINCLINATION="37;-79;" ID="Arrow_ID_537236489" SOURCE="ID_1163131751" STARTARROW="None" STARTINCLINATION="30;44;"/>
|
||||
<icon BUILTIN="pencil"/>
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node COLOR="#338800" CREATED="1536357900635" ID="ID_646733499" MODIFIED="1536533192790" TEXT="brauche einen "leer"-Status im Filter">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node CREATED="1536367745114" ID="ID_945289619" MODIFIED="1536367753030" TEXT="explizit als bool-Flag">
|
||||
|
|
@ -32112,19 +32112,19 @@
|
|||
<node COLOR="#338800" CREATED="1536357952068" ID="ID_876149668" MODIFIED="1536539163737" TEXT="nur an die Kette anfügen, wenn nicht leer">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1536539178616" HGAP="1" ID="ID_708494808" MODIFIED="1536539195867" TEXT="defekt" VSHIFT="20">
|
||||
<node COLOR="#435e98" CREATED="1536539178616" HGAP="1" ID="ID_708494808" MODIFIED="1536632461895" TEXT="defekt" VSHIFT="20">
|
||||
<icon BUILTIN="broken-line"/>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1536539306399" ID="ID_639133520" MODIFIED="1536539400436" TEXT="Basis-Layer wird zwei mal gepullt">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node COLOR="#338800" CREATED="1536539306399" ID="ID_639133520" MODIFIED="1536632455687" TEXT="Basis-Layer wird zwei mal gepullt">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node CREATED="1536539323716" ID="ID_1627599615" MODIFIED="1536539353260" TEXT="einmal beim direkten Rekonfigurieren"/>
|
||||
<node CREATED="1536539357408" ID="ID_834480997" MODIFIED="1536539373834" TEXT="dann nochmal generisch"/>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1536541001266" ID="ID_1480503625" MODIFIED="1536541008706" TEXT="in else-Zweig ziehen">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node COLOR="#338800" CREATED="1536541001266" ID="ID_1480503625" MODIFIED="1536632457387" TEXT="in else-Zweig ziehen">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1536539386764" ID="ID_487266350" MODIFIED="1536631289616" TEXT="erschöpfter Iter bricht ab">
|
||||
<node COLOR="#338800" CREATED="1536539386764" ID="ID_487266350" MODIFIED="1536632452032" TEXT="erschöpfter Iter bricht ab">
|
||||
<arrowlink COLOR="#c5789c" DESTINATION="ID_1288939799" ENDARROW="Default" ENDINCLINATION="99;3;" ID="Arrow_ID_1528021143" STARTARROW="None" STARTINCLINATION="-35;27;"/>
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
|
|
|
|||
Loading…
Reference in a new issue