diff --git a/src/hb-repacker.hh b/src/hb-repacker.hh index 8d222712d..e553bc622 100644 --- a/src/hb-repacker.hh +++ b/src/hb-repacker.hh @@ -629,26 +629,31 @@ struct graph_t char* head, hb_serialize_context_t* c) const { - if (link.width == 4) + switch (link.width) { + case 4: if (link.is_signed) { serialize_link_of_type (link, head, c); } else { serialize_link_of_type (link, head, c); } - } - else if (link.width == 2) - { + return; + case 2: if (link.is_signed) { serialize_link_of_type (link, head, c); } else { serialize_link_of_type (link, head, c); } - } - else + return; + case 3: serialize_link_of_type (link, head, c); + return; + default: + // Unexpected link width. + assert (0); + } } public: