Changeset 352 for cpp/frams/model


Ignore:
Timestamp:
04/17/15 00:51:37 (10 years ago)
Author:
oriona
Message:

comparison between signed and unsigned integer expressions fixed

Location:
cpp/frams/model/similarity
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/model/similarity/simil_match.cpp

    r349 r352  
    2727    // fill vectors with "unmatched" indicator
    2828    int i;
    29     for (i = 0; i < m_apvMatched[0]->size(); i++)
     29    for (i = 0; i < (int) m_apvMatched[0]->size(); i++)
    3030    {
    3131        m_apvMatched[0]->operator[](i) = -1;
    3232    }
    33     for (i = 0; i < m_apvMatched[1]->size(); i++)
     33    for (i = 0; i < (int) m_apvMatched[1]->size(); i++)
    3434    {
    3535        m_apvMatched[1]->operator[](i) = -1;
     
    8686    // check parameters of object 0
    8787    assert((Obj0 == 0) || (Obj0 == 1));
    88     assert((Index0 >= 0) && (Index0 < m_apvMatched[Obj0]->size()));
     88    assert((Index0 >= 0) && (Index0 < (int) m_apvMatched[Obj0]->size()));
    8989    // check parameters of object 1
    9090    assert(((Obj1 == 0) || (Obj1 == 1)) && (Obj0 != Obj1));
    91     assert((Index1 >= 0) && (Index1 < m_apvMatched[Obj1]->size()));
     91    assert((Index1 >= 0) && (Index1 < (int) m_apvMatched[Obj1]->size()));
    9292
    9393    // match given elements
     
    108108    // check parameters
    109109    assert((Obj == 0) || (Obj == 1));
    110     assert((Index >= 0) && (Index < m_apvMatched[ Obj ]->size()));
     110    assert((Index >= 0) && (Index < (int) m_apvMatched[ Obj ]->size()));
    111111
    112112    // check if the element is matched
     
    133133    // check parameters
    134134    assert((Obj == 0) || (Obj == 1));
    135     assert((Index >= 0) && (Index < m_apvMatched[ Obj ]->size()));
     135    assert((Index >= 0) && (Index < (int) m_apvMatched[ Obj ]->size()));
    136136
    137137    // return the index of the matched element
     
    163163
    164164    // check if all elements of the smallest object are matched
    165     for (nElem = 0; nElem < m_apvMatched[ nObj ]->size(); nElem++)
     165    for (nElem = 0; nElem < (int) m_apvMatched[ nObj ]->size(); nElem++)
    166166    {
    167167        if (m_apvMatched[ nObj ]->operator[](nElem) < 0)
     
    189189    // so it may be first object
    190190    int nObj = 0;
    191     for (nElem = 0; nElem < m_apvMatched[ nObj ]->size(); nElem++)
     191    for (nElem = 0; nElem < (int) m_apvMatched[ nObj ]->size(); nElem++)
    192192    {
    193193        if (m_apvMatched[ nObj ]->operator[](nElem) >= 0)
     
    212212    {
    213213        // for each object in the matching
    214         for (iElem = 0; iElem < m_apvMatched[ iObj ]->size(); iElem++)
     214        for (iElem = 0; iElem < (int) m_apvMatched[ iObj ]->size(); iElem++)
    215215        {
    216216            // for each element iElem for the object iObj
     
    243243    // print first line - indices of objects
    244244    printf("[ ");
    245     for (i = 0; i < m_apvMatched[ nBigger ]->size(); i++)
     245    for (i = 0; i < (int) m_apvMatched[ nBigger ]->size(); i++)
    246246    {
    247247        printf("%2i ", i);
     
    254254        // for both objects - print out lines of matched elements
    255255        printf("[ ");
    256         for (i = 0; i < m_apvMatched[ nObj ]->size(); i++)
     256        for (i = 0; i < (int) m_apvMatched[ nObj ]->size(); i++)
    257257        {
    258258            if (IsMatched(nObj, i))
  • cpp/frams/model/similarity/simil_model.cpp

    r349 r352  
    735735                {
    736736                    GetNeighbIndexes(mod, partInd, nIndexes);
    737                     for (int k = 0; k < nIndexes.size(); k++)
     737                    for (int k = 0; k < (int) nIndexes.size(); k++)
    738738                    {
    739739                        newDeg += m_fuzzyNeighb[mod][nIndexes.at(k)][depth - 1];
     
    16801680int ModelSimil::MatchPartsGeometry()
    16811681{
    1682     // uniwersalne liczniki
    1683     int i, j;
    1684 
    16851682    // zaloz, ze sa modele i sa poprawne
    16861683    assert((m_Mod[0] != NULL) && (m_Mod[1] != NULL));
     
    17261723        // wartości orginalne transformacji dOrig uzyskuje się przez:
    17271724        // for ( iTrans = 0; iTrans <= TRANS_INDEX; iTrans++ ) dOrig *= dMul[ iTrans ];
    1728         const char *szTransformNames[ NO_OF_TRANSFORM ] = {"ID", "S_yz", "S_xz", "S_xy",
    1729             "R180_z", "R180_y", "R180_z", "S_(0,0,0)"};
    17301725        const int dMulX[ NO_OF_TRANSFORM ] = {1, -1, -1, 1, -1, 1, -1, -1};
    17311726        const int dMulY[ NO_OF_TRANSFORM ] = {1, 1, -1, -1, -1, -1, -1, 1};
Note: See TracChangeset for help on using the changeset viewer.