src/c++/lib/variant/RefVar.cpp
/**
 * Helper to aggregate reference variants base by base
 *
 * Refpos must be > vars.back().end
 *
 */
Helper to aggregate reference variants base by base
Refpos must be > vars.back().end
Helper to aggregate reference variants base by base Refpos must be > vars . back () . end
void appendToVarList(int64_t refpos, char refchr, char altchr, std::list<variant::RefVar>& vars, int flags)
{
#ifdef DEBUG_REFVAR
    std::cerr << refpos << " " << refchr << " " << altchr << " nv: " << vars.size() << "\n";
#endif
    if (refchr == altchr)
    {
        return;
    }
    if (vars.empty())
    {
        RefVar rv;
        mkRefVar(refpos, refchr, altchr, rv);
        rv.flags = flags;
        vars.push_back(rv);
    }
    else
    {
        RefVar& xrv = vars.back();
        if (flags != xrv.flags || !appendToRefVar(refpos, refchr, altchr, xrv))
        {
            RefVar rv;
            mkRefVar(refpos, refchr, altchr, rv);
            rv.flags = flags;
            vars.push_back(rv);
        }
    }
}
void appendToVarList ( int64_t refpos , char refchr , char altchr , std :: list < variant :: RefVar > & vars , int flags ) { #ifdef DEBUG_REFVAR std :: cerr << refpos << " " << refchr << " " << altchr << " " << vars . size ( ) << " \n " ; #endif if ( refchr == altchr ) { return ; } if ( vars . empty ( ) ) { RefVar rv ; mkRefVar ( refpos , refchr , altchr , rv ) ; rv . flags = flags ; vars . push_back ( rv ) ; } else { RefVar & xrv = vars . back ( ) ; if ( flags != xrv . flags || ! appendToRefVar ( refpos , refchr , altchr , xrv ) ) { RefVar rv ; mkRefVar ( refpos , refchr , altchr , rv ) ; rv . flags = flags ; vars . push_back ( rv ) ; } } }
Helper to aggregate reference variants base by base
 Refpos must be > vars.back().end
Helper to aggregate reference variants base by base Refpos must be > vars . back () . end