提交 40a47979 编写于 作者: B Behdad Esfahbod

[otlayout] Add GenericSortedArrayOf

上级 0ddecabc
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册