[util] Rename template typenames to avoid clashing with actual types

Apparently MSVC2015 can confuse them

Fixes https://github.com/harfbuzz/harfbuzz/issues/3379
This commit is contained in:
Behdad Esfahbod 2022-02-18 12:29:14 -06:00
parent f6efe34f5e
commit c0b2f50c0b
3 changed files with 14 additions and 8 deletions

View File

@ -59,8 +59,8 @@ struct shape_closure_consumer_t
failed = false;
buffer = hb_buffer_create ();
}
template <typename text_options_t>
bool consume_line (text_options_t &text_opts)
template <typename text_options_type>
bool consume_line (text_options_type &text_opts)
{
unsigned int text_len;
const char *text;

View File

@ -377,11 +377,11 @@ static const char *helper_cairo_supported_formats[] =
};
template <typename view_options_t,
typename output_options_t>
typename output_options_type>
static inline cairo_t *
helper_cairo_create_context (double w, double h,
view_options_t *view_opts,
output_options_t *out_opts,
output_options_type *out_opts,
cairo_content_t content)
{
cairo_surface_t *(*constructor) (cairo_write_func_t write_func,

View File

@ -31,8 +31,14 @@
/* main() body for utilities taking font and processing text.*/
template <typename consumer_t, typename font_options_t, typename text_options_t>
struct main_font_text_t : option_parser_t, font_options_t, text_options_t, consumer_t
template <typename consumer_t,
typename font_options_type,
typename text_options_type>
struct main_font_text_t :
option_parser_t,
font_options_type,
text_options_type,
consumer_t
{
int operator () (int argc, char **argv)
{
@ -53,8 +59,8 @@ struct main_font_text_t : option_parser_t, font_options_t, text_options_t, consu
void add_options ()
{
font_options_t::add_options (this);
text_options_t::add_options (this);
font_options_type::add_options (this);
text_options_type::add_options (this);
consumer_t::add_options (this);
GOptionEntry entries[] =