From ba5208d5ff64ef60b7bac915b899e1b346959c0f Mon Sep 17 00:00:00 2001 From: "Max Base (Seyyed Ali Mohammadiyeh)" Date: Wed, 26 Mar 2025 17:17:23 +0330 Subject: [PATCH] Fix and add a space after single line comments --- src/hb-aat-layout-kerx-table.hh | 4 ++-- src/hb-aat-layout-morx-table.hh | 4 ++-- src/hb-array.hh | 4 ++-- src/hb-cairo-utils.cc | 2 +- src/hb-coretext.cc | 2 +- src/hb-directwrite-font.cc | 6 +++--- src/hb-open-file.hh | 2 +- src/hb-open-type.hh | 2 +- src/hb-ot-cmap-table.hh | 2 +- src/hb-ot-font.cc | 4 ++-- src/hb-ot-layout-common.hh | 10 +++++----- src/hb-ot-var-fvar-table.hh | 4 ++-- 12 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/hb-aat-layout-kerx-table.hh b/src/hb-aat-layout-kerx-table.hh index e5b17ba1d..f510e8e1c 100644 --- a/src/hb-aat-layout-kerx-table.hh +++ b/src/hb-aat-layout-kerx-table.hh @@ -399,7 +399,7 @@ struct KerxSubTableFormat1 void collect_glyphs (set_t &left_set, set_t &right_set, unsigned num_glyphs) const { machine.collect_initial_glyphs (left_set, num_glyphs, *this); - //machine.collect_glyphs (right_set, num_glyphs); // right_set is unused for machine kerning + // machine.collect_glyphs (right_set, num_glyphs); // right_set is unused for machine kerning } protected: @@ -674,7 +674,7 @@ struct KerxSubTableFormat4 void collect_glyphs (set_t &left_set, set_t &right_set, unsigned num_glyphs) const { machine.collect_initial_glyphs (left_set, num_glyphs, *this); - //machine.collect_glyphs (right_set, num_glyphs); // right_set is unused for machine kerning + // machine.collect_glyphs (right_set, num_glyphs); // right_set is unused for machine kerning } protected: diff --git a/src/hb-aat-layout-morx-table.hh b/src/hb-aat-layout-morx-table.hh index 663e47991..c6283b1ff 100644 --- a/src/hb-aat-layout-morx-table.hh +++ b/src/hb-aat-layout-morx-table.hh @@ -1073,7 +1073,7 @@ struct ChainSubtable { TRACE_APPLY (this); // Disabled for https://github.com/harfbuzz/harfbuzz/issues/4873 - //hb_sanitize_with_object_t with (&c->sanitizer, this); + // hb_sanitize_with_object_t with (&c->sanitizer, this); return_trace (dispatch (c)); } @@ -1087,7 +1087,7 @@ struct ChainSubtable return_trace (false); // Disabled for https://github.com/harfbuzz/harfbuzz/issues/4873 - //hb_sanitize_with_object_t with (c, this); + // hb_sanitize_with_object_t with (c, this); return_trace (dispatch (c)); } diff --git a/src/hb-array.hh b/src/hb-array.hh index 6e458ffd8..d2a97ffd2 100644 --- a/src/hb-array.hh +++ b/src/hb-array.hh @@ -221,14 +221,14 @@ struct hb_array_t : hb_iter_with_fallback_t, Type&> hb_sorted_array_t qsort (int (*cmp_)(const void*, const void*)) { - //static_assert (hb_enable_if (hb_is_trivially_copy_assignable(Type)), ""); + // static_assert (hb_enable_if (hb_is_trivially_copy_assignable(Type)), ""); if (likely (length)) hb_qsort (arrayZ, length, this->get_item_size (), cmp_); return hb_sorted_array_t (*this); } hb_sorted_array_t qsort () { - //static_assert (hb_enable_if (hb_is_trivially_copy_assignable(Type)), ""); + // static_assert (hb_enable_if (hb_is_trivially_copy_assignable(Type)), ""); if (likely (length)) hb_qsort (arrayZ, length, this->get_item_size (), Type::cmp); return hb_sorted_array_t (*this); diff --git a/src/hb-cairo-utils.cc b/src/hb-cairo-utils.cc index 85c62d39a..cbceb22e3 100644 --- a/src/hb-cairo-utils.cc +++ b/src/hb-cairo-utils.cc @@ -765,7 +765,7 @@ _hb_cairo_add_sweep_gradient_patches (hb_color_stop_t *stops, } } - //assert (angles[0] + k * span <= 0 && 0 < angles[n_stops - 1] + k * span); + // assert (angles[0] + k * span <= 0 && 0 < angles[n_stops - 1] + k * span); span = fabsf (span); for (signed l = k; l < 1000; l++) diff --git a/src/hb-coretext.cc b/src/hb-coretext.cc index 6c0525b3a..d5d2546d6 100644 --- a/src/hb-coretext.cc +++ b/src/hb-coretext.cc @@ -546,7 +546,7 @@ done: font->data.coretext.cmpexch (nullptr, (hb_coretext_font_data_t *) CFRetain (ct_font)); // https://github.com/harfbuzz/harfbuzz/pull/4895#issuecomment-2408471254 - //hb_coretext_font_set_funcs (font); + // hb_coretext_font_set_funcs (font); return font; } diff --git a/src/hb-directwrite-font.cc b/src/hb-directwrite-font.cc index 9752110e4..370e07887 100644 --- a/src/hb-directwrite-font.cc +++ b/src/hb-directwrite-font.cc @@ -306,7 +306,7 @@ static struct hb_directwrite_font_funcs_lazy_loader_t : hb_font_funcs_lazy_loade hb_font_funcs_t *funcs = hb_font_funcs_create (); hb_font_funcs_set_nominal_glyphs_func (funcs, hb_directwrite_get_nominal_glyphs, nullptr, nullptr); - //hb_font_funcs_set_variation_glyph_func (funcs, hb_directwrite_get_variation_glyph, nullptr, nullptr); + // hb_font_funcs_set_variation_glyph_func (funcs, hb_directwrite_get_variation_glyph, nullptr, nullptr); hb_font_funcs_set_font_h_extents_func (funcs, hb_directwrite_get_font_h_extents, nullptr, nullptr); hb_font_funcs_set_glyph_h_advances_func (funcs, hb_directwrite_get_glyph_h_advances, nullptr, nullptr); @@ -323,8 +323,8 @@ static struct hb_directwrite_font_funcs_lazy_loader_t : hb_font_funcs_lazy_loade hb_font_funcs_set_glyph_extents_func (funcs, hb_directwrite_get_glyph_extents, nullptr, nullptr); #ifndef HB_NO_OT_FONT_GLYPH_NAMES - //hb_font_funcs_set_glyph_name_func (funcs, hb_directwrite_get_glyph_name, nullptr, nullptr); - //hb_font_funcs_set_glyph_from_name_func (funcs, hb_directwrite_get_glyph_from_name, nullptr, nullptr); + // hb_font_funcs_set_glyph_name_func (funcs, hb_directwrite_get_glyph_name, nullptr, nullptr); + // hb_font_funcs_set_glyph_from_name_func (funcs, hb_directwrite_get_glyph_from_name, nullptr, nullptr); #endif hb_font_funcs_make_immutable (funcs); diff --git a/src/hb-open-file.hh b/src/hb-open-file.hh index 6c98226f2..0e14bfacb 100644 --- a/src/hb-open-file.hh +++ b/src/hb-open-file.hh @@ -183,7 +183,7 @@ typedef struct OpenTypeOffsetTable CheckSum checksum; /* The following line is a slower version of the following block. */ - //checksum.set_for_data (this, (const char *) c->head - (const char *) this); + // checksum.set_for_data (this, (const char *) c->head - (const char *) this); checksum.set_for_data (this, dir_end - (const char *) this); for (unsigned int i = 0; i < num_items; i++) { diff --git a/src/hb-open-type.hh b/src/hb-open-type.hh index f2040ea5c..6a123f5df 100644 --- a/src/hb-open-type.hh +++ b/src/hb-open-type.hh @@ -489,7 +489,7 @@ struct OffsetTo : Offset TRACE_SANITIZE (this); if (unlikely (!c->check_struct (this))) return_trace (false); hb_barrier (); - //if (unlikely (this->is_null ())) return_trace (true); + // if (unlikely (this->is_null ())) return_trace (true); if (unlikely ((const char *) base + (unsigned) *this < (const char *) base)) return_trace (false); return_trace (true); } diff --git a/src/hb-ot-cmap-table.hh b/src/hb-ot-cmap-table.hh index 7a7a77ad5..38bed02b5 100644 --- a/src/hb-ot-cmap-table.hh +++ b/src/hb-ot-cmap-table.hh @@ -481,7 +481,7 @@ struct CmapSubtableFormat4 format4_iter }; - //serialize endCode[], startCode[], idDelta[] + // serialize endCode[], startCode[], idDelta[] HBUINT16* endCode = c->start_embed (); unsigned segcount = serialize_find_segcount (cp_to_gid.iter()); if (unlikely (!serialize_start_end_delta_arrays (c, cp_to_gid.iter(), segcount))) diff --git a/src/hb-ot-font.cc b/src/hb-ot-font.cc index 9bd0db4b8..58a920018 100644 --- a/src/hb-ot-font.cc +++ b/src/hb-ot-font.cc @@ -636,7 +636,7 @@ static struct hb_ot_font_funcs_lazy_loader_t : hb_font_funcs_lazy_loader_taxes_index_tag_map->has (axisIndex)) return DROP_RECORD_WITH_VAR; @@ -3890,12 +3890,12 @@ struct ConditionAxisRange axis_default_val > filter_max_val) c->apply = false; - //condition not met, drop the entire record + // condition not met, drop the entire record if (axis_min_val > filter_max_val || axis_max_val < filter_min_val || filter_min_val > filter_max_val) return DROP_RECORD_WITH_VAR; - //condition met and axis pinned, drop the condition + // condition met and axis pinned, drop the condition if (axis_set_by_user && axis_range.is_point ()) return DROP_COND_WITH_VAR; @@ -4260,9 +4260,9 @@ struct ConditionSet if (!should_keep) return; - //check if condition_set is unique with variations + // check if condition_set is unique with variations if (c->conditionset_map->has (p)) - //duplicate found, drop the entire record + // duplicate found, drop the entire record return; c->conditionset_map->set (p, 1); diff --git a/src/hb-ot-var-fvar-table.hh b/src/hb-ot-var-fvar-table.hh index 0e8bd2560..e50a784c4 100644 --- a/src/hb-ot-var-fvar-table.hh +++ b/src/hb-ot-var-fvar-table.hh @@ -107,7 +107,7 @@ struct InstanceRecord if (!axis_coord_pinned_or_within_axis_range (coords, i, *axis_limit)) return_trace (false); - //skip pinned axis + // skip pinned axis if (axis_limit->is_point ()) continue; } @@ -425,7 +425,7 @@ struct fvar { TRACE_SUBSET (this); unsigned retained_axis_count = c->plan->axes_index_map.get_population (); - if (!retained_axis_count) //all axes are pinned + if (!retained_axis_count) // all axes are pinned return_trace (false); fvar *out = c->serializer->embed (this);