提交 4c3b19d5 编写于 作者: B Behdad Esfahbod

Support HBUINT32 BinSearchArrayOf

上级 456a68c5
...@@ -706,6 +706,7 @@ struct SortedArrayOf : ArrayOf<Type, LenType> ...@@ -706,6 +706,7 @@ struct SortedArrayOf : ArrayOf<Type, LenType>
* Binary-search arrays * Binary-search arrays
*/ */
template <typename LenType=HBUINT16>
struct BinSearchHeader struct BinSearchHeader
{ {
inline operator uint32_t (void) const { return len; } inline operator uint32_t (void) const { return len; }
...@@ -728,17 +729,17 @@ struct BinSearchHeader ...@@ -728,17 +729,17 @@ struct BinSearchHeader
} }
protected: protected:
HBUINT16 len; LenType len;
HBUINT16 searchRange; LenType searchRange;
HBUINT16 entrySelector; LenType entrySelector;
HBUINT16 rangeShift; LenType rangeShift;
public: public:
DEFINE_SIZE_STATIC (8); DEFINE_SIZE_STATIC (8);
}; };
template <typename Type> template <typename Type, typename LenType=HBUINT16>
struct BinSearchArrayOf : SortedArrayOf<Type, BinSearchHeader> {}; struct BinSearchArrayOf : SortedArrayOf<Type, BinSearchHeader<LenType> > {};
struct VarSizedBinSearchHeader struct VarSizedBinSearchHeader
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册