Bugfix: must init TreeMutator explicitly now
as consequence of previous fix. Also, when building the preconfigured TreeMutator for GenNode, the init hook must be called explicitly now.
This commit is contained in:
parent
1725a31df1
commit
22f06dca23
3 changed files with 6 additions and 1 deletions
|
|
@ -379,7 +379,7 @@ namespace diff{
|
|||
using Target = typename TreeDiffTraits<TAR>::Ret;
|
||||
|
||||
Target target = mutatorBinding (subject_);
|
||||
buildMutator (target)->init();
|
||||
buildMutator(target)->init();
|
||||
TreeDiffMutatorBinding::scopeManger_ = &scopes_;
|
||||
TreeDiffMutatorBinding::treeMutator_ = &scopes_.currentScope();
|
||||
REQUIRE (this->treeMutator_);
|
||||
|
|
|
|||
|
|
@ -654,6 +654,7 @@ namespace diff{
|
|||
{
|
||||
mutateInPlace (target.data.get<Rec>())
|
||||
.buildMutator(buff);
|
||||
buff.get()->init();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -89,6 +89,8 @@ namespace test{
|
|||
<< " type="<< typeStr(mutator)
|
||||
<< endl;
|
||||
|
||||
mutator.init();
|
||||
|
||||
CHECK (isnil (localData));
|
||||
string testValue{"that would be acceptable"};
|
||||
mutator.assignElm ({"lore", testValue});
|
||||
|
|
@ -120,6 +122,8 @@ namespace test{
|
|||
<< " type="<< typeStr(mutator)
|
||||
<< endl;
|
||||
|
||||
mutator.init();
|
||||
|
||||
CHECK (isnil (values));
|
||||
CHECK (mutator.matchSrc (GenNode("a")));
|
||||
mutator.skipSrc (GenNode("a"));
|
||||
|
|
|
|||
Loading…
Reference in a new issue