Esempio n. 1
0
 internal void primeBranches(BranchContainer.iterator beg, BranchContainer.iterator end)
 {
     for (; beg != end; ++beg)
     {
         _branches.insert(beg.item());
     }
 }
Esempio n. 2
0
        internal string cleanseBranch(string branch)
        {
            lock (_branches)
            {
                BranchContainer.iterator it = _branches.find(branch);

                if (it != _branches.end())
                {
                    /* if they're not equal, return the one in the list.
                     * otherwise, return the one they gave us.
                     */
                    if (branch != it.item())
                    {
                        branch = it.item();
                    }
                }
                else
                {
                    /* i don't already know about this branch,
                     * so record it.
                     */
                    _branches.insert(branch);
                }
            }

            return(branch);
        }