summaryrefslogtreecommitdiff
path: root/qmake/include/qtl.h
Unidiff
Diffstat (limited to 'qmake/include/qtl.h') (more/less context) (show whitespace changes)
-rw-r--r--qmake/include/qtl.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/qmake/include/qtl.h b/qmake/include/qtl.h
index 346cecc..25631fd 100644
--- a/qmake/include/qtl.h
+++ b/qmake/include/qtl.h
@@ -68,48 +68,49 @@ public:
68}; 68};
69#endif //QT_NO_TEXTSTREAM 69#endif //QT_NO_TEXTSTREAM
70 70
71template <class InputIterator, class OutputIterator> 71template <class InputIterator, class OutputIterator>
72inline OutputIterator qCopy( InputIterator _begin, InputIterator _end, 72inline OutputIterator qCopy( InputIterator _begin, InputIterator _end,
73 OutputIterator _dest ) 73 OutputIterator _dest )
74{ 74{
75 while( _begin != _end ) 75 while( _begin != _end )
76 *_dest++ = *_begin++; 76 *_dest++ = *_begin++;
77 return _dest; 77 return _dest;
78} 78}
79 79
80template <class BiIterator, class BiOutputIterator> 80template <class BiIterator, class BiOutputIterator>
81inline BiOutputIterator qCopyBackward( BiIterator _begin, BiIterator _end, 81inline BiOutputIterator qCopyBackward( BiIterator _begin, BiIterator _end,
82 BiOutputIterator _dest ) 82 BiOutputIterator _dest )
83{ 83{
84 while ( _begin != _end ) 84 while ( _begin != _end )
85 *--_dest = *--_end; 85 *--_dest = *--_end;
86 return _dest; 86 return _dest;
87} 87}
88 88
89template <class InputIterator1, class InputIterator2> 89template <class InputIterator1, class InputIterator2>
90inline bool qEqual( InputIterator1 first1, InputIterator1 last1, InputIterator2 first2 ) 90inline bool qEqual( InputIterator1 first1, InputIterator1 last1, InputIterator2 first2 )
91{ 91{
92 // ### compare using !(*first1 == *first2) in Qt 4.0
92 for ( ; first1 != last1; ++first1, ++first2 ) 93 for ( ; first1 != last1; ++first1, ++first2 )
93 if ( *first1 != *first2 ) 94 if ( *first1 != *first2 )
94 return FALSE; 95 return FALSE;
95 return TRUE; 96 return TRUE;
96} 97}
97 98
98template <class ForwardIterator, class T> 99template <class ForwardIterator, class T>
99inline void qFill( ForwardIterator first, ForwardIterator last, const T& val ) 100inline void qFill( ForwardIterator first, ForwardIterator last, const T& val )
100{ 101{
101 for ( ; first != last; ++first ) 102 for ( ; first != last; ++first )
102 *first = val; 103 *first = val;
103} 104}
104 105
105#if 0 106#if 0
106template <class BiIterator, class OutputIterator> 107template <class BiIterator, class OutputIterator>
107inline OutputIterator qReverseCopy( BiIterator _begin, BiIterator _end, 108inline OutputIterator qReverseCopy( BiIterator _begin, BiIterator _end,
108 OutputIterator _dest ) 109 OutputIterator _dest )
109{ 110{
110 while ( _begin != _end ) { 111 while ( _begin != _end ) {
111 --_end; 112 --_end;
112 *_dest = *_end; 113 *_dest = *_end;
113 ++_dest; 114 ++_dest;
114 } 115 }
115 return _dest; 116 return _dest;