mirror of
https://github.com/boostorg/iterator.git
synced 2025-07-29 20:37:17 +02:00
Replace move with static_cast
This commit is contained in:
committed by
Georgy Guminov
parent
4a49b8a1a2
commit
a0d04d9491
@ -56,13 +56,13 @@ namespace iterators {
|
||||
filter_iterator() { }
|
||||
|
||||
filter_iterator(Predicate f, Iterator x, Iterator end_ = Iterator())
|
||||
: super_t(std::move(x)), m_predicate(std::move(f)), m_end(std::move(end_))
|
||||
: super_t(static_cast<Iterator&&>(x)), m_predicate(static_cast<Predicate&&>(f)), m_end(static_cast<Iterator&&>(end_))
|
||||
{
|
||||
satisfy_predicate();
|
||||
}
|
||||
|
||||
filter_iterator(Iterator x, Iterator end_ = Iterator())
|
||||
: super_t(std::move(x)), m_predicate(), m_end(std::move(end_))
|
||||
: super_t(static_cast<Iterator&&>(x)), m_predicate(), m_end(static_cast<Iterator&&>(end_))
|
||||
{
|
||||
// Pro8 is a little too aggressive about instantiating the
|
||||
// body of this function.
|
||||
@ -113,7 +113,7 @@ namespace iterators {
|
||||
inline filter_iterator<Predicate,Iterator>
|
||||
make_filter_iterator(Predicate f, Iterator x, Iterator end = Iterator())
|
||||
{
|
||||
return filter_iterator<Predicate,Iterator>(std::move(f), std::move(x), std::move(end));
|
||||
return filter_iterator<Predicate,Iterator>(static_cast<Predicate&&>(f), static_cast<Iterator&&>(x), static_cast<Iterator&&>(end));
|
||||
}
|
||||
|
||||
template <class Predicate, class Iterator>
|
||||
@ -125,7 +125,7 @@ namespace iterators {
|
||||
>::type x
|
||||
, Iterator end = Iterator())
|
||||
{
|
||||
return filter_iterator<Predicate,Iterator>(std::move(x), std::move(end));
|
||||
return filter_iterator<Predicate,Iterator>(static_cast<Iterator&&>(x), static_cast<Iterator&&>(end));
|
||||
}
|
||||
|
||||
} // namespace iterators
|
||||
|
Reference in New Issue
Block a user