ref: c42848e6d9d2a2aa9adcc99fa4e817f4e4e9f656
parent: 22fff25385ef42f46ff7a23b4175d24f7afad491
author: Werner Lemberg <[email protected]>
date: Sun Feb 26 14:44:04 EST 2012
[type42] Minor code optimization. * src/type42/t42parse.c (t42_parse_sfnts): Use bitmask instead of modulo operator.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-02-26 Alexei Podtelezhnikov <[email protected]>
+
+ [type42] Minor code optimization.
+
+ * src/type42/t42parse.c (t42_parse_sfnts): Use bitmask instead of
+ modulo operator.
+
2012-02-26 Werner Lemberg <[email protected]>
* docs/CHANGES: Updated.
--- a/src/type42/t42parse.c
+++ b/src/type42/t42parse.c
@@ -608,8 +608,8 @@
}
/* A string can have a trailing zero byte for padding. Ignore it. */
- if ( string_size &&
- string_buf[string_size - 1] == 0 && ( string_size % 2 == 1 ) )
+ if ( string_size &&
+ string_buf[string_size - 1] == 0 && ( string_size & 1 ) )
string_size--;
if ( !string_size )