[otlayout] Add GenericSortedArrayOf
This commit is contained in:
parent
0ddecabc6d
commit
40a479797a
@ -949,9 +949,9 @@ struct HeadlessArrayOf
|
||||
|
||||
|
||||
/* An array with sorted elements. Supports binary searching. */
|
||||
template <typename Type>
|
||||
struct SortedArrayOf : ArrayOf<Type> {
|
||||
|
||||
template <typename LenType, typename Type>
|
||||
struct GenericSortedArrayOf : GenericArrayOf<LenType, Type>
|
||||
{
|
||||
template <typename SearchType>
|
||||
inline int search (const SearchType &x) const
|
||||
{
|
||||
@ -972,6 +972,10 @@ struct SortedArrayOf : ArrayOf<Type> {
|
||||
}
|
||||
};
|
||||
|
||||
/* A sorted array with a USHORT number of elements. */
|
||||
template <typename Type>
|
||||
struct SortedArrayOf : GenericSortedArrayOf<USHORT, Type> {};
|
||||
|
||||
|
||||
} /* namespace OT */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user