MCPcopy Create free account
hub / github.com/acl-dev/acl / tpl_adjust_selection

Function tpl_adjust_selection

app/wizard/tpllib.cpp:547–571  ·  view source on GitHub ↗

Set up the selected section pointer to correspond to that of the copied template */

Source from the content-addressed store, hash-verified

545/* Set up the selected section pointer to correspond to
546 that of the copied template */
547static void tpl_adjust_selection(tpl_t* tpl,
548 const tpl_t* srctpl,
549 tpl_tcell_t* sec,
550 const tpl_tcell_t* srcsec)
551{
552 const tpl_tcell_t *sec1 = srcsec;
553 tpl_tcell_t *sec2 = sec;
554
555 if (srctpl->tpl != srctpl)
556 {
557 for (; tpl->tpl == tpl && sec1 != NULL;
558 sec1 = sec1->next, sec2 = sec2->next)
559 {
560 if (srctpl->tpl == sec1->tpl)
561 tpl->tpl = sec2->tpl;
562 else
563 {
564 tpl_adjust_selection(tpl,
565 srctpl,
566 sec2->tpl->first,
567 sec1->tpl->first);
568 }
569 }
570 }
571}
572
573
574/* Recursive copy */

Callers 1

tpl_copyFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…