[arrays] Update ArrayOf.lsearch()
Currently unused apparently
This commit is contained in:
parent
22e1857b01
commit
3e26c8d2b1
|
@ -545,14 +545,23 @@ struct ArrayOf
|
||||||
return_trace (true);
|
return_trace (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename SearchType>
|
template <typename T>
|
||||||
inline int lsearch (const SearchType &x) const
|
inline Type &lsearch (const T &x)
|
||||||
{
|
{
|
||||||
unsigned int count = len;
|
unsigned int count = len;
|
||||||
for (unsigned int i = 0; i < count; i++)
|
for (unsigned int i = 0; i < count; i++)
|
||||||
if (!this->arrayZ[i].cmp (x))
|
if (!this->arrayZ[i].cmp (x))
|
||||||
return i;
|
return this->arrayZ[i];
|
||||||
return -1;
|
return Crap (T);
|
||||||
|
}
|
||||||
|
template <typename T>
|
||||||
|
inline const Type &lsearch (const T &x) const
|
||||||
|
{
|
||||||
|
unsigned int count = len;
|
||||||
|
for (unsigned int i = 0; i < count; i++)
|
||||||
|
if (!this->arrayZ[i].cmp (x))
|
||||||
|
return this->arrayZ[i];
|
||||||
|
return Null (T);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void qsort (void)
|
inline void qsort (void)
|
||||||
|
|
Loading…
Reference in New Issue