Fix ‘looses precision’ warning in public API
Change-Id: I935e6f278e539f8e6aaca0bc381371ec85aa5c67 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This commit is contained in:
parent
8fcab70408
commit
48ecb2d434
@ -876,7 +876,7 @@ struct CapabilitiesImpl<T, std::random_access_iterator_tag>
|
||||
template<typename T>
|
||||
struct ContainerAPI : CapabilitiesImpl<T>
|
||||
{
|
||||
static int size(const T *t) { return std::distance(t->begin(), t->end()); }
|
||||
static int size(const T *t) { return int(std::distance(t->begin(), t->end())); }
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
@ -1102,8 +1102,8 @@ public:
|
||||
|
||||
template<class T>
|
||||
static int sizeImpl(const void *p)
|
||||
{ return std::distance(static_cast<const T*>(p)->begin(),
|
||||
static_cast<const T*>(p)->end()); }
|
||||
{ return int(std::distance(static_cast<const T*>(p)->begin(),
|
||||
static_cast<const T*>(p)->end())); }
|
||||
|
||||
template<class T>
|
||||
static void findImpl(const void *container, const void *p, void **iterator)
|
||||
|
@ -262,7 +262,7 @@ public:
|
||||
inline const_iterator &operator-=(int j) { i-=j; return *this; }
|
||||
inline const_iterator operator+(int j) const { return const_iterator(i+j); }
|
||||
inline const_iterator operator-(int j) const { return const_iterator(i-j); }
|
||||
inline int operator-(const_iterator j) const { return i - j.i; }
|
||||
inline int operator-(const_iterator j) const { return int(i - j.i); }
|
||||
};
|
||||
friend class const_iterator;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user