minor, tweak spacing

turn 8 spaces to tab, add space before Null/Crap
This commit is contained in:
Ebrahim Byagowi 2020-04-20 14:12:45 +04:30
parent ac26f19c9e
commit 2dda6dd744
48 changed files with 315 additions and 314 deletions

View File

@ -66,7 +66,7 @@ struct ankr
{
const NNOffsetTo<GlyphAnchors> *offset = (this+lookupTable).get_value (glyph_id, num_glyphs);
if (!offset)
return Null(Anchor);
return Null (Anchor);
const GlyphAnchors &anchors = &(this+anchorData) + *offset;
return anchors[i];
}

View File

@ -303,7 +303,7 @@ struct LookupFormat10
const typename T::type get_value_or_null (hb_codepoint_t glyph_id) const
{
if (!(firstGlyph <= glyph_id && glyph_id - firstGlyph < glyphCount))
return Null(T);
return Null (T);
const HBUINT8 *p = &valueArrayZ[(glyph_id - firstGlyph) * valueSize];
@ -358,7 +358,7 @@ struct Lookup
case 10: return u.format10.get_value_or_null (glyph_id);
default:
const T *v = get_value (glyph_id, num_glyphs);
return v ? *v : Null(T);
return v ? *v : Null (T);
}
}
@ -825,7 +825,7 @@ struct hb_aat_apply_context_t :
HB_INTERNAL hb_aat_apply_context_t (const hb_ot_shape_plan_t *plan_,
hb_font_t *font_,
hb_buffer_t *buffer_,
hb_blob_t *blob = const_cast<hb_blob_t *> (&Null(hb_blob_t)));
hb_blob_t *blob = const_cast<hb_blob_t *> (&Null (hb_blob_t)));
HB_INTERNAL ~hb_aat_apply_context_t ();

View File

@ -55,7 +55,7 @@ AAT::hb_aat_apply_context_t::hb_aat_apply_context_t (const hb_ot_shape_plan_t *p
face (font->face),
buffer (buffer_),
sanitizer (),
ankr_table (&Null(AAT::ankr)),
ankr_table (&Null (AAT::ankr)),
lookup_index (0),
debug_depth (0)
{

View File

@ -189,7 +189,7 @@ hb_blob_copy_writable_or_fail (hb_blob_t *blob)
hb_blob_t *
hb_blob_get_empty ()
{
return const_cast<hb_blob_t *> (&Null(hb_blob_t));
return const_cast<hb_blob_t *> (&Null (hb_blob_t));
}
/**

View File

@ -715,7 +715,7 @@ hb_buffer_create ()
hb_buffer_t *
hb_buffer_get_empty ()
{
return const_cast<hb_buffer_t *> (&Null(hb_buffer_t));
return const_cast<hb_buffer_t *> (&Null (hb_buffer_t));
}
/**

View File

@ -228,10 +228,10 @@ struct hb_buffer_t
/* Makes a copy of the glyph at idx to output and replace glyph_index */
hb_glyph_info_t & output_glyph (hb_codepoint_t glyph_index)
{
if (unlikely (!make_room_for (0, 1))) return Crap(hb_glyph_info_t);
if (unlikely (!make_room_for (0, 1))) return Crap (hb_glyph_info_t);
if (unlikely (idx == len && !out_len))
return Crap(hb_glyph_info_t);
return Crap (hb_glyph_info_t);
out_info[out_len] = idx < len ? info[idx] : out_info[out_len - 1];
out_info[out_len].codepoint = glyph_index;

View File

@ -405,7 +405,7 @@ struct cff_stack_t
else
{
set_error ();
return Crap(ELEM);
return Crap (ELEM);
}
}
@ -416,7 +416,7 @@ struct cff_stack_t
else
{
set_error ();
return Crap(ELEM);
return Crap (ELEM);
}
}
void pop (unsigned int n)
@ -432,7 +432,7 @@ struct cff_stack_t
if (unlikely (count < 0))
{
set_error ();
return Null(ELEM);
return Null (ELEM);
}
return elements[count - 1];
}

View File

@ -82,7 +82,7 @@ struct biased_subrs_t
byte_str_t operator [] (unsigned int index) const
{
if (unlikely ((subrs == nullptr) || index >= subrs->count))
return Null(byte_str_t);
return Null (byte_str_t);
else
return (*subrs)[index];
}

View File

@ -90,7 +90,7 @@ struct cff2_cs_interp_env_t : cs_interp_env_t<blend_arg_t, CFF2Subrs>
seen_blend = false;
seen_vsindex_ = false;
scalars.init ();
do_blend = (coords != nullptr) && num_coords && (varStore != &Null(CFF2VariationStore));
do_blend = (coords != nullptr) && num_coords && (varStore != &Null (CFF2VariationStore));
set_ivs (acc.privateDicts[fd].ivs);
}

View File

@ -226,7 +226,7 @@ hb_face_create (hb_blob_t *blob,
hb_face_t *
hb_face_get_empty ()
{
return const_cast<hb_face_t *> (&Null(hb_face_t));
return const_cast<hb_face_t *> (&Null (hb_face_t));
}

View File

@ -1465,7 +1465,7 @@ hb_font_create_sub_font (hb_font_t *parent)
hb_font_t *
hb_font_get_empty ()
{
return const_cast<hb_font_t *> (&Null(hb_font_t));
return const_cast<hb_font_t *> (&Null (hb_font_t));
}
/**

View File

@ -234,7 +234,7 @@ struct hb_lazy_loader_t : hb_data_wrapper_t<Data, WheresData>
static Returned* convert (Stored *p) { return p; }
/* By default null/init/fini the object. */
static const Stored* get_null () { return &Null(Stored); }
static const Stored* get_null () { return &Null (Stored); }
static Stored *create (Data *data)
{
Stored *p = (Stored *) calloc (1, sizeof (Stored));

View File

@ -69,7 +69,7 @@ hb_map_create ()
hb_map_t *
hb_map_get_empty ()
{
return const_cast<hb_map_t *> (&Null(hb_map_t));
return const_cast<hb_map_t *> (&Null (hb_map_t));
}
/**

View File

@ -135,7 +135,7 @@ template <typename Type>
static inline Type& Crap () {
static_assert (hb_null_size (Type) <= HB_NULL_POOL_SIZE, "Increase HB_NULL_POOL_SIZE.");
Type *obj = reinterpret_cast<Type *> (_hb_CrapPool);
memcpy (obj, &Null(Type), sizeof (*obj));
memcpy (obj, &Null (Type), sizeof (*obj));
return *obj;
}
template <typename QType>
@ -148,11 +148,11 @@ struct CrapHelper
template <typename Type>
struct CrapOrNullHelper {
static Type & get () { return Crap(Type); }
static Type & get () { return Crap (Type); }
};
template <typename Type>
struct CrapOrNullHelper<const Type> {
static const Type & get () { return Null(Type); }
static const Type & get () { return Null (Type); }
};
#define CrapOrNull(Type) CrapOrNullHelper<Type>::get ()
@ -174,7 +174,7 @@ struct hb_nonnull_ptr_t
/* Only auto-cast to const types. */
template <typename C> operator const C * () const { return get (); }
operator const char * () const { return (const char *) get (); }
T * get () const { return v ? v : const_cast<T *> (&Null(T)); }
T * get () const { return v ? v : const_cast<T *> (&Null (T)); }
T * get_raw () const { return v; }
T *v;

View File

@ -249,7 +249,7 @@ struct TTCHeader
switch (u.header.version.major) {
case 2: /* version 2 is compatible with version 1 */
case 1: return u.version1.get_face (i);
default:return Null(OpenTypeFontFace);
default:return Null (OpenTypeFontFace);
}
}
@ -478,7 +478,7 @@ struct OpenTypeFontFile
case TrueTypeTag: return u.fontFace;
case TTCTag: return u.ttcHeader.get_face (i);
case DFontTag: return u.rfHeader.get_face (i, base_offset);
default: return Null(OpenTypeFontFace);
default: return Null (OpenTypeFontFace);
}
}

View File

@ -321,7 +321,7 @@ struct CFFIndexOf : CFFIndex<COUNT>
{
if (likely (index < CFFIndex<COUNT>::count))
return byte_str_t (CFFIndex<COUNT>::data_base () + CFFIndex<COUNT>::offset_at (index) - 1, CFFIndex<COUNT>::length_at (index));
return Null(byte_str_t);
return Null (byte_str_t);
}
template <typename DATA, typename PARAM1, typename PARAM2>

View File

@ -840,7 +840,7 @@ struct cff1_private_dict_values_base_t : dict_values_t<VAL>
{
dict_values_t<VAL>::init ();
subrsOffset = 0;
localSubrs = &Null(CFF1Subrs);
localSubrs = &Null (CFF1Subrs);
}
void fini () { dict_values_t<VAL>::fini (); }
@ -950,7 +950,7 @@ struct cff1_font_dict_values_mod_t
{
cff1_font_dict_values_mod_t() { init (); }
void init () { init ( &Null(cff1_font_dict_values_t), CFF_UNDEF_SID ); }
void init () { init ( &Null (cff1_font_dict_values_t), CFF_UNDEF_SID ); }
void init (const cff1_font_dict_values_t *base_,
unsigned int fontName_)
@ -1011,7 +1011,7 @@ struct cff1
const OT::cff1 *cff = this->blob->template as<OT::cff1> ();
if (cff == &Null(OT::cff1))
if (cff == &Null (OT::cff1))
{ fini (); return; }
nameIndex = &cff->nameIndex (cff);
@ -1032,7 +1032,7 @@ struct cff1
}
if (is_predef_charset ())
charset = &Null(Charset);
charset = &Null (Charset);
else
{
charset = &StructAtOffsetOrNull<Charset> (cff, topDict.CharsetOffset);
@ -1044,22 +1044,22 @@ struct cff1
{
fdArray = &StructAtOffsetOrNull<CFF1FDArray> (cff, topDict.FDArrayOffset);
fdSelect = &StructAtOffsetOrNull<CFF1FDSelect> (cff, topDict.FDSelectOffset);
if (unlikely ((fdArray == &Null(CFF1FDArray)) || !fdArray->sanitize (&sc) ||
(fdSelect == &Null(CFF1FDSelect)) || !fdSelect->sanitize (&sc, fdArray->count)))
if (unlikely ((fdArray == &Null (CFF1FDArray)) || !fdArray->sanitize (&sc) ||
(fdSelect == &Null (CFF1FDSelect)) || !fdSelect->sanitize (&sc, fdArray->count)))
{ fini (); return; }
fdCount = fdArray->count;
}
else
{
fdArray = &Null(CFF1FDArray);
fdSelect = &Null(CFF1FDSelect);
fdArray = &Null (CFF1FDArray);
fdSelect = &Null (CFF1FDSelect);
}
encoding = &Null(Encoding);
encoding = &Null (Encoding);
if (is_CID ())
{
if (unlikely (charset == &Null(Charset))) { fini (); return; }
if (unlikely (charset == &Null (Charset))) { fini (); return; }
}
else
{
@ -1080,7 +1080,7 @@ struct cff1
charStrings = &StructAtOffsetOrNull<CFF1CharStrings> (cff, topDict.charStringsOffset);
if ((charStrings == &Null(CFF1CharStrings)) || unlikely (!charStrings->sanitize (&sc)))
if ((charStrings == &Null (CFF1CharStrings)) || unlikely (!charStrings->sanitize (&sc)))
{ fini (); return; }
num_glyphs = charStrings->count;
@ -1102,7 +1102,7 @@ struct cff1
cff1_font_dict_interpreter_t font_interp;
font_interp.env.init (fontDictStr);
font = fontDicts.push ();
if (unlikely (font == &Crap(cff1_font_dict_values_t))) { fini (); return; }
if (unlikely (font == &Crap (cff1_font_dict_values_t))) { fini (); return; }
font->init ();
if (unlikely (!font_interp.interpret (*font))) { fini (); return; }
PRIVDICTVAL *priv = &privateDicts[i];
@ -1114,7 +1114,7 @@ struct cff1
if (unlikely (!priv_interp.interpret (*priv))) { fini (); return; }
priv->localSubrs = &StructAtOffsetOrNull<CFF1Subrs> (&privDictStr, priv->subrsOffset);
if (priv->localSubrs != &Null(CFF1Subrs) &&
if (priv->localSubrs != &Null (CFF1Subrs) &&
unlikely (!priv->localSubrs->sanitize (&sc)))
{ fini (); return; }
}
@ -1132,7 +1132,7 @@ struct cff1
if (unlikely (!priv_interp.interpret (*priv))) { fini (); return; }
priv->localSubrs = &StructAtOffsetOrNull<CFF1Subrs> (&privDictStr, priv->subrsOffset);
if (priv->localSubrs != &Null(CFF1Subrs) &&
if (priv->localSubrs != &Null (CFF1Subrs) &&
unlikely (!priv->localSubrs->sanitize (&sc)))
{ fini (); return; }
}
@ -1159,7 +1159,7 @@ struct cff1
if (unlikely (sid == CFF_UNDEF_SID))
return 0;
if (charset != &Null(Charset))
if (charset != &Null (Charset))
return charset->get_glyph (sid, num_glyphs);
else if ((topDict.CharsetOffset == ISOAdobeCharset)
&& (code <= 228 /*zcaron*/)) return sid;
@ -1170,7 +1170,7 @@ struct cff1
hb_codepoint_t glyph_to_code (hb_codepoint_t glyph) const
{
if (encoding != &Null(Encoding))
if (encoding != &Null (Encoding))
return encoding->get_code (glyph);
else
{
@ -1194,7 +1194,7 @@ struct cff1
hb_codepoint_t glyph_to_sid (hb_codepoint_t glyph) const
{
if (charset != &Null(Charset))
if (charset != &Null (Charset))
return charset->get_sid (glyph, num_glyphs);
else
{
@ -1219,7 +1219,7 @@ struct cff1
hb_codepoint_t sid_to_glyph (hb_codepoint_t sid) const
{
if (charset != &Null(Charset))
if (charset != &Null (Charset))
return charset->get_glyph (sid, num_glyphs);
else
{
@ -1259,7 +1259,8 @@ struct cff1
unsigned int fdCount;
cff1_top_dict_values_t topDict;
hb_vector_t<cff1_font_dict_values_t> fontDicts;
hb_vector_t<cff1_font_dict_values_t>
fontDicts;
hb_vector_t<PRIVDICTVAL> privateDicts;
unsigned int num_glyphs;

View File

@ -232,7 +232,7 @@ struct cff2_private_dict_values_base_t : dict_values_t<VAL>
{
dict_values_t<VAL>::init ();
subrsOffset = 0;
localSubrs = &Null(CFF2Subrs);
localSubrs = &Null (CFF2Subrs);
ivs = 0;
}
void fini () { dict_values_t<VAL>::fini (); }
@ -411,7 +411,7 @@ struct cff2
const OT::cff2 *cff2 = this->blob->template as<OT::cff2> ();
if (cff2 == &Null(OT::cff2))
if (cff2 == &Null (OT::cff2))
{ fini (); return; }
{ /* parse top dict */
@ -429,11 +429,11 @@ struct cff2
fdArray = &StructAtOffsetOrNull<CFF2FDArray> (cff2, topDict.FDArrayOffset);
fdSelect = &StructAtOffsetOrNull<CFF2FDSelect> (cff2, topDict.FDSelectOffset);
if (((varStore != &Null(CFF2VariationStore)) && unlikely (!varStore->sanitize (&sc))) ||
(charStrings == &Null(CFF2CharStrings)) || unlikely (!charStrings->sanitize (&sc)) ||
(globalSubrs == &Null(CFF2Subrs)) || unlikely (!globalSubrs->sanitize (&sc)) ||
(fdArray == &Null(CFF2FDArray)) || unlikely (!fdArray->sanitize (&sc)) ||
(((fdSelect != &Null(CFF2FDSelect)) && unlikely (!fdSelect->sanitize (&sc, fdArray->count)))))
if (((varStore != &Null (CFF2VariationStore)) && unlikely (!varStore->sanitize (&sc))) ||
(charStrings == &Null (CFF2CharStrings)) || unlikely (!charStrings->sanitize (&sc)) ||
(globalSubrs == &Null (CFF2Subrs)) || unlikely (!globalSubrs->sanitize (&sc)) ||
(fdArray == &Null (CFF2FDArray)) || unlikely (!fdArray->sanitize (&sc)) ||
(((fdSelect != &Null (CFF2FDSelect)) && unlikely (!fdSelect->sanitize (&sc, fdArray->count)))))
{ fini (); return; }
num_glyphs = charStrings->count;
@ -452,7 +452,7 @@ struct cff2
cff2_font_dict_interpreter_t font_interp;
font_interp.env.init (fontDictStr);
font = fontDicts.push ();
if (unlikely (font == &Crap(cff2_font_dict_values_t))) { fini (); return; }
if (unlikely (font == &Crap (cff2_font_dict_values_t))) { fini (); return; }
font->init ();
if (unlikely (!font_interp.interpret (*font))) { fini (); return; }
@ -464,7 +464,7 @@ struct cff2
if (unlikely (!priv_interp.interpret (privateDicts[i]))) { fini (); return; }
privateDicts[i].localSubrs = &StructAtOffsetOrNull<CFF2Subrs> (&privDictStr[0], privateDicts[i].subrsOffset);
if (privateDicts[i].localSubrs != &Null(CFF2Subrs) &&
if (privateDicts[i].localSubrs != &Null (CFF2Subrs) &&
unlikely (!privateDicts[i].localSubrs->sanitize (&sc)))
{ fini (); return; }
}

View File

@ -155,7 +155,7 @@ struct CPAL
private:
const CPALV1Tail& v1 () const
{
if (version == 0) return Null(CPALV1Tail);
if (version == 0) return Null (CPALV1Tail);
return StructAfter<CPALV1Tail> (*this);
}

View File

@ -1498,7 +1498,7 @@ struct Coverage
struct iter_t : hb_iter_with_fallback_t<iter_t, hb_codepoint_t>
{
static constexpr bool is_sorted_iterator = true;
iter_t (const Coverage &c_ = Null(Coverage))
iter_t (const Coverage &c_ = Null (Coverage))
{
memset (this, 0, sizeof (*this));
format = c_.u.format;

View File

@ -494,7 +494,7 @@ struct GDEF
bool has_var_store () const { return version.to_int () >= 0x00010003u && varStore != 0; }
const VariationStore &get_var_store () const
{ return version.to_int () >= 0x00010003u ? this+varStore : Null(VariationStore); }
{ return version.to_int () >= 0x00010003u ? this+varStore : Null (VariationStore); }
/* glyph_props is a 16-bit integer where the lower 8-bit have bits representing
* glyph class and other bits, and high 8-bit the mark attachment type (if any).

View File

@ -465,7 +465,7 @@ struct AnchorMatrix
unsigned int cols, bool *found) const
{
*found = false;
if (unlikely (row >= rows || col >= cols)) return Null(Anchor);
if (unlikely (row >= rows || col >= cols)) return Null (Anchor);
*found = !matrixZ[row * cols + col].is_null ();
return this+matrixZ[row * cols + col];
}

View File

@ -314,7 +314,7 @@ struct hb_add_coverage_context_t :
typedef const Coverage &return_t;
template <typename T>
return_t dispatch (const T &obj) { return obj.get_coverage (); }
static return_t default_return_value () { return Null(Coverage); }
static return_t default_return_value () { return Null (Coverage); }
bool stop_sublookup_iteration (return_t r) const
{
r.add_coverage (set);
@ -569,7 +569,7 @@ struct hb_ot_apply_context_t :
#ifndef HB_NO_OT_LAYOUT
*face->table.GDEF->table
#else
Null(GDEF)
Null (GDEF)
#endif
),
var_store (gdef.get_var_store ()),
@ -2967,7 +2967,7 @@ struct Extension
{
switch (u.format) {
case 1: return u.format1.template get_subtable<typename T::SubTable> ();
default:return Null(typename T::SubTable);
default:return Null (typename T::SubTable);
}
}

View File

@ -419,7 +419,7 @@ get_gsubgpos_table (hb_face_t *face,
switch (table_tag) {
case HB_OT_TAG_GSUB: return *face->table.GSUB->table;
case HB_OT_TAG_GPOS: return *face->table.GPOS->table;
default: return Null(OT::GSUBGPOS);
default: return Null (OT::GSUBGPOS);
}
}

View File

@ -292,7 +292,7 @@ arabic_fallback_plan_create (const hb_ot_shape_plan_t *plan,
{
arabic_fallback_plan_t *fallback_plan = (arabic_fallback_plan_t *) calloc (1, sizeof (arabic_fallback_plan_t));
if (unlikely (!fallback_plan))
return const_cast<arabic_fallback_plan_t *> (&Null(arabic_fallback_plan_t));
return const_cast<arabic_fallback_plan_t *> (&Null (arabic_fallback_plan_t));
fallback_plan->num_lookups = 0;
fallback_plan->free_lookups = false;
@ -309,7 +309,7 @@ arabic_fallback_plan_create (const hb_ot_shape_plan_t *plan,
assert (fallback_plan->num_lookups == 0);
free (fallback_plan);
return const_cast<arabic_fallback_plan_t *> (&Null(arabic_fallback_plan_t));
return const_cast<arabic_fallback_plan_t *> (&Null (arabic_fallback_plan_t));
}
static void

View File

@ -139,7 +139,7 @@ struct index_map_subset_plan_t
max_inners.init ();
output_map.init ();
if (&index_map == &Null(DeltaSetIndexMap)) return;
if (&index_map == &Null (DeltaSetIndexMap)) return;
unsigned int last_val = (unsigned int)-1;
hb_codepoint_t last_gid = (hb_codepoint_t)-1;
@ -202,7 +202,7 @@ struct index_map_subset_plan_t
const hb_vector_t<hb_inc_bimap_t> &inner_maps,
const hb_subset_plan_t *plan)
{
if (input_map == &Null(DeltaSetIndexMap)) return;
if (input_map == &Null (DeltaSetIndexMap)) return;
for (unsigned int i = 0; i < max_inners.length; i++)
{

View File

@ -69,7 +69,7 @@ hb_set_create ()
hb_set_t *
hb_set_get_empty ()
{
return const_cast<hb_set_t *> (&Null(hb_set_t));
return const_cast<hb_set_t *> (&Null (hb_set_t));
}
/**

View File

@ -808,7 +808,7 @@ struct hb_set_t
struct iter_t : hb_iter_with_fallback_t<iter_t, hb_codepoint_t>
{
static constexpr bool is_sorted_iterator = true;
iter_t (const hb_set_t &s_ = Null(hb_set_t),
iter_t (const hb_set_t &s_ = Null (hb_set_t),
bool init = true) : s (&s_), v (INVALID), l(0)
{
if (init)

View File

@ -257,7 +257,7 @@ bail:
hb_shape_plan_t *
hb_shape_plan_get_empty ()
{
return const_cast<hb_shape_plan_t *> (&Null(hb_shape_plan_t));
return const_cast<hb_shape_plan_t *> (&Null (hb_shape_plan_t));
}
/**

View File

@ -44,7 +44,7 @@ struct str_encoder_t
void encode_byte (unsigned char b)
{
if (unlikely (buff.push (b) == &Crap(unsigned char)))
if (unlikely (buff.push (b) == &Crap (unsigned char)))
set_error ();
}

View File

@ -82,7 +82,7 @@ struct cff1_sub_table_info_t : cff_sub_table_info_t
/* a copy of a parsed out cff1_top_dict_values_t augmented with additional operators */
struct cff1_top_dict_values_mod_t : cff1_top_dict_values_t
{
void init (const cff1_top_dict_values_t *base_= &Null(cff1_top_dict_values_t))
void init (const cff1_top_dict_values_t *base_= &Null (cff1_top_dict_values_t))
{
SUPER::init ();
base = base_;
@ -437,7 +437,7 @@ struct cff_subset_plan {
}
last_code = code;
if (encoding != &Null(Encoding))
if (encoding != &Null (Encoding))
{
hb_codepoint_t sid = acc.glyph_to_sid (old_glyph);
encoding->get_supplement_codes (sid, supp_codes);
@ -521,7 +521,7 @@ struct cff_subset_plan {
}
}
if (acc.fdArray != &Null(CFF1FDArray))
if (acc.fdArray != &Null (CFF1FDArray))
for (unsigned int i = 0; i < orig_fdcount; i++)
if (fdmap.has (i))
(void)sidmap.add (acc.fontDicts[i].fontName);
@ -572,7 +572,7 @@ struct cff_subset_plan {
}
/* Determine re-mapping of font index as fdmap among other info */
if (acc.fdSelect != &Null(CFF1FDSelect))
if (acc.fdSelect != &Null (CFF1FDSelect))
{
if (unlikely (!hb_plan_subset_cff_fdselect (plan,
orig_fdcount,
@ -763,7 +763,7 @@ static bool _serialize_cff1 (hb_serialize_context_t *c,
}
/* FDArray (FD Index) */
if (acc.fdArray != &Null(CFF1FDArray))
if (acc.fdArray != &Null (CFF1FDArray))
{
CFF1FDArray *fda = c->start_embed<CFF1FDArray> ();
if (unlikely (fda == nullptr)) return false;
@ -780,7 +780,7 @@ static bool _serialize_cff1 (hb_serialize_context_t *c,
}
/* FDSelect */
if (acc.fdSelect != &Null(CFF1FDSelect))
if (acc.fdSelect != &Null (CFF1FDSelect))
{
c->push ();
if (likely (hb_serialize_cff_fdselect (c, num_glyphs, *acc.fdSelect, acc.fdCount,

View File

@ -300,7 +300,7 @@ struct cff2_subset_plan {
}
/* FDSelect */
if (acc.fdSelect != &Null(CFF2FDSelect))
if (acc.fdSelect != &Null (CFF2FDSelect))
{
if (unlikely (!hb_plan_subset_cff_fdselect (plan,
orig_fdcount,
@ -397,7 +397,7 @@ static bool _serialize_cff2 (hb_serialize_context_t *c,
}
/* FDSelect */
if (acc.fdSelect != &Null(CFF2FDSelect))
if (acc.fdSelect != &Null (CFF2FDSelect))
{
c->push ();
if (likely (hb_serialize_cff_fdselect (c, num_glyphs, *(const FDSelect *)acc.fdSelect, plan.orig_fdcount,
@ -428,7 +428,7 @@ static bool _serialize_cff2 (hb_serialize_context_t *c,
}
/* variation store */
if (acc.varStore != &Null(CFF2VariationStore))
if (acc.varStore != &Null (CFF2VariationStore))
{
c->push ();
CFF2VariationStore *dest = c->start_embed<CFF2VariationStore> ();

View File

@ -212,7 +212,7 @@ DEFINE_NULL_INSTANCE (hb_unicode_funcs_t) =
hb_unicode_funcs_t *
hb_unicode_funcs_get_empty ()
{
return const_cast<hb_unicode_funcs_t *> (&Null(hb_unicode_funcs_t));
return const_cast<hb_unicode_funcs_t *> (&Null (hb_unicode_funcs_t));
}
/**

View File

@ -117,7 +117,7 @@ struct hb_vector_t
{
unsigned int i = (unsigned int) i_;
if (unlikely (i >= length))
return Null(Type);
return Null (Type);
return arrayZ[i];
}
@ -165,7 +165,7 @@ struct hb_vector_t
Type *push ()
{
if (unlikely (!resize (length + 1)))
return &Crap(Type);
return &Crap (Type);
return &arrayZ[length - 1];
}
template <typename T>
@ -228,7 +228,7 @@ struct hb_vector_t
Type pop ()
{
if (!length) return Null(Type);
if (!length) return Null (Type);
return hb_move (arrayZ[--length]); /* Does this move actually work? */
}

View File

@ -105,7 +105,7 @@ test_iterator (Iter it)
template <typename Iterable,
hb_requires (hb_is_iterable (Iterable))>
static void
test_iterable (const Iterable &lst = Null(Iterable))
test_iterable (const Iterable &lst = Null (Iterable))
{
for (auto _ : lst)
(void) _;