Changeset 888 for cpp/common/util-stl.h


Ignore:
Timestamp:
07/22/19 01:15:38 (5 years ago)
Author:
Maciej Komosinski
Message:

More explicit code to fix compiler warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/common/util-stl.h

    r840 r888  
    3232        typename vector<T>::iterator it = find(v.begin(), v.end(), e);
    3333        if (it != v.end())
    34                 return &*it - &v.front();
     34                return int(&*it - &v.front());
    3535        return -1;
    3636}
     
    4242        ~DeletingVector()
    4343        {
    44                 for (int i = vector.size() - 1; i >= 0; i--)
     44                for (int i = (int)vector.size() - 1; i >= 0; i--)
    4545                        delete vector[i];
    4646        }
Note: See TracChangeset for help on using the changeset viewer.