Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 808


Ignore:
Timestamp:
Feb 12, 2008, 9:26:58 PM (16 years ago)
Author:
landauf
Message:

Fixed a small bug in the clean-function of ClassTreeMask (I made it recursively and forgot the recursion-call :D). From what I see now the ClassTreeMask works fine. And yes, I know it's overkill, no one will ever use more than 10% of the features, but I like it. ;)

Location:
code/branches/core/src/orxonox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core/src/orxonox/Orxonox.cc

    r807 r808  
    925925        std::cout << "Mask 1 ^ Mask 2:\n";
    926926        TestClassTreeMask(test13_10);
    927         test13_10 = test13_10;
    928         TestClassTreeMask(test13_10);
    929927
    930928        std::cout << "8\n";
     
    962960        TestClassTreeMask(test13_11);
    963961        TestClassTreeMask(test13_13);
     962
     963        test13_1 = test13_1;
     964        std::cout << std::endl;
     965        std::cout << "Mask 1 assigned with = operator to itself:\n";
     966        TestClassTreeMask(test13_1);
    964967
    965968        std::cout << "9\n";
  • code/branches/core/src/orxonox/core/ClassTreeMask.cc

    r807 r808  
    278278    void ClassTreeMask::clean(ClassTreeMaskNode* node)
    279279    {
     280//std::cout << "4_1: " << node->getClass()->getName() << ": " << node->isIncluded() << "\n";
    280281        for (std::list<ClassTreeMaskNode*>::iterator it = node->subnodes_.begin(); it != node->subnodes_.end(); )
    281282        {
     283//std::cout << "4_2: " << (*it)->getClass()->getName() << ": " << (*it)->isIncluded() << "\n";
     284            this->clean(*it);
     285//std::cout << "4_3\n";
    282286            if ((*it)->isIncluded() == node->isIncluded())
    283287            {
     288//std::cout << "4_4\n";
    284289                node->subnodes_.insert(node->subnodes_.end(), (*it)->subnodes_.begin(), (*it)->subnodes_.end());
    285290                (*it)->subnodes_.clear();
    286291                node->subnodes_.erase(it);
    287292                it = node->subnodes_.begin();
     293//std::cout << "4_5\n";
    288294            }
    289295            else
    290296            {
     297//std::cout << "4_6\n";
    291298                ++it;
    292299            }
    293300        }
     301//std::cout << "4_7\n";
    294302    }
    295303
Note: See TracChangeset for help on using the changeset viewer.