Minor
This commit is contained in:
parent
c62a8f10f3
commit
d7bf473ef2
|
@ -10,7 +10,6 @@ test "x$HBHEADERS" = x && HBHEADERS=`find . -maxdepth 1 -name 'hb*.h'`
|
||||||
test "x$HBSOURCES" = x && HBSOURCES=`find . -maxdepth 1 -name 'hb-*.cc' -or -name 'hb-*.hh'`
|
test "x$HBSOURCES" = x && HBSOURCES=`find . -maxdepth 1 -name 'hb-*.cc' -or -name 'hb-*.hh'`
|
||||||
|
|
||||||
|
|
||||||
echo $srcdir
|
|
||||||
for x in $HBHEADERS $HBSOURCES; do
|
for x in $HBHEADERS $HBSOURCES; do
|
||||||
test -f "$srcdir/$x" && x="$srcdir/$x"
|
test -f "$srcdir/$x" && x="$srcdir/$x"
|
||||||
echo "$x" | grep '[^h]$' -q && continue;
|
echo "$x" | grep '[^h]$' -q && continue;
|
||||||
|
|
|
@ -338,12 +338,12 @@ struct Sanitizer
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
template <typename Type, int Bytes> class BEInt;
|
template <typename Type, int Bytes> struct BEInt;
|
||||||
|
|
||||||
/* LONGTERMTODO: On machines allowing unaligned access, we can make the
|
/* LONGTERMTODO: On machines allowing unaligned access, we can make the
|
||||||
* following tighter by using byteswap instructions on ints directly. */
|
* following tighter by using byteswap instructions on ints directly. */
|
||||||
template <typename Type>
|
template <typename Type>
|
||||||
class BEInt<Type, 2>
|
struct BEInt<Type, 2>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
inline void set (Type i) { hb_be_uint16_put (v,i); }
|
inline void set (Type i) { hb_be_uint16_put (v,i); }
|
||||||
|
@ -353,7 +353,7 @@ class BEInt<Type, 2>
|
||||||
private: uint8_t v[2];
|
private: uint8_t v[2];
|
||||||
};
|
};
|
||||||
template <typename Type>
|
template <typename Type>
|
||||||
class BEInt<Type, 4>
|
struct BEInt<Type, 4>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
inline void set (Type i) { hb_be_uint32_put (v,i); }
|
inline void set (Type i) { hb_be_uint32_put (v,i); }
|
||||||
|
@ -691,8 +691,8 @@ struct SortedArrayOf : ArrayOf<Type> {
|
||||||
|
|
||||||
template <typename SearchType>
|
template <typename SearchType>
|
||||||
inline int search (const SearchType &x) const {
|
inline int search (const SearchType &x) const {
|
||||||
class Cmp {
|
struct Cmp {
|
||||||
public: static int cmp (const SearchType *a, const Type *b) { return b->cmp (*a); }
|
static int cmp (const SearchType *a, const Type *b) { return b->cmp (*a); }
|
||||||
};
|
};
|
||||||
const Type *p = (const Type *) bsearch (&x, this->array, this->len, sizeof (this->array[0]), (hb_compare_func_t) Cmp::cmp);
|
const Type *p = (const Type *) bsearch (&x, this->array, this->len, sizeof (this->array[0]), (hb_compare_func_t) Cmp::cmp);
|
||||||
return p ? p - this->array : -1;
|
return p ? p - this->array : -1;
|
||||||
|
|
Loading…
Reference in New Issue