diff --git a/src/hb-ot-cff-common.hh b/src/hb-ot-cff-common.hh index 61677197b..19b35af1f 100644 --- a/src/hb-ot-cff-common.hh +++ b/src/hb-ot-cff-common.hh @@ -107,64 +107,12 @@ struct CFFIndex /* serialize indices */ unsigned int offset = 1; unsigned int i = 0; -#ifdef HB_OPTIMIZE_SIZE for (unsigned _ : +it) { set_offset_at (i++, offset); offset += _; } set_offset_at (i, offset); -#else - switch (off_size) - { - case 1: - { - HBUINT8 *p = (HBUINT8 *) offsets; - for (unsigned _ : +it) - { - p[i++] = offset; - offset += _; - } - p[i] = offset; - break; - } - case 2: - { - HBUINT16 *p = (HBUINT16 *) offsets; - for (unsigned _ : +it) - { - p[i++] = offset; - offset += _; - } - p[i] = offset; - break; - } - case 3: - { - HBUINT24 *p = (HBUINT24 *) offsets; - for (unsigned _ : +it) - { - p[i++] = offset; - offset += _; - } - p[i] = offset; - break; - } - case 4: - { - HBUINT32 *p = (HBUINT32 *) offsets; - for (unsigned _ : +it) - { - p[i++] = offset; - offset += _; - } - p[i] = offset; - break; - } - default: - break; - } -#endif return_trace (true); }